posted @ 2014-07-07 16:39 Xiaohan S. 阅读(133) 评论(0) 推荐(0)
摘要:
1. 层序构建和先序遍历: 1 public class Tree { 2 public Tree left; 3 public Tree right; 4 public int val; 5 6 public Tree() { 7 8 } 9 10 ... 阅读全文
摘要:
最近有兴趣开始搞了个OAnno开源项目。想用SpringMVC框架来做一个WEB APP然后上面可以在线分配Annotation工作给Worker,worker在线做好后直接提交。基本功能正在完善中。1. 在有表单的网页上,返回必须是ModelAndView('url',"command",new ... 阅读全文
posted @ 2014-06-18 01:21 Xiaohan S. 阅读(161) 评论(0) 推荐(0)
摘要:
Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For exam... 阅读全文
posted @ 2014-06-09 00:45 Xiaohan S. 阅读(120) 评论(0) 推荐(0)
摘要:
pep8.py 是个检测python源代码文件是否符合pep8编码习惯。首先这个文件将待检测的文件按行读入,然后分为physical_line和logical_line分别对待。physical_line一般检测tab和空格,空行,每行长度等等问题。logical_line检测的就是细致的语法了。目... 阅读全文
posted @ 2014-06-08 13:25 Xiaohan S. 阅读(156) 评论(0) 推荐(0)
摘要:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-... 阅读全文
posted @ 2014-06-08 00:33 Xiaohan S. 阅读(156) 评论(0) 推荐(0)
摘要:
Given an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, wh... 阅读全文
posted @ 2014-06-04 20:13 Xiaohan S. 阅读(149) 评论(0) 推荐(0)
摘要:
Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu... 阅读全文
posted @ 2014-06-03 22:05 Xiaohan S. 阅读(125) 评论(0) 推荐(0)
摘要:
To implement such a class, we should firstly implement one method named compareTo()(int). We have better implement (int)hashCode() and equals() (boolean) to make sure that the same object returns the same hash code.After that, we may use Array.sort() or Collections.sort to rank, or even can apply in 阅读全文
posted @ 2013-04-23 11:17 Xiaohan S. 阅读(122) 评论(0) 推荐(0)
浙公网安备 33010602011771号