摘要: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 此题看似简单,但有几种情况要注意:对于10这种数字的处理;对于溢出的处理。 溢出不意味着ans_bef... 阅读全文
posted @ 2015-02-04 17:38 evashi 阅读(141) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1... 阅读全文
posted @ 2015-02-04 14:07 evashi 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 对Queue 进队出队的使用不是很了解,刷题时想要直接用,所以查了一下。平时用的话用add 和remove 即可。 Queue 是接口。 LinkedList 实现了Queue接口,可当做Queue使用。 Queue list=new LinkedList(); 进队: boolean ad... 阅读全文
posted @ 2015-02-04 12:28 evashi 阅读(371) 评论(0) 推荐(0) 编辑