2014年7月30日

摘要: 1 package leetcode; 2 3 public class DetectCycle { 4 public ListNode detectCycle(ListNode head) { 5 ListNode s=head; 6 ListNode ... 阅读全文
posted @ 2014-07-30 17:25 thehappyyouth 阅读(161) 评论(0) 推荐(0) 编辑
 
摘要: 1 package leetcode; 2 3 public class ReOrderList { 4 public void reorderList(ListNode head) { 5 if(head==null||head.next==null||head.ne... 阅读全文
posted @ 2014-07-30 17:10 thehappyyouth 阅读(139) 评论(0) 推荐(0) 编辑
 
摘要: 1 package leetcode; 2 3 class ListNode { 4 int val; 5 ListNode next; 6 7 ListNode(int x) { 8 val = x; 9 next = null;10 ... 阅读全文
posted @ 2014-07-30 12:40 thehappyyouth 阅读(127) 评论(0) 推荐(0) 编辑