摘要:
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ 阅读全文
posted @ 2016-02-16 23:27 cKK 阅读(111) 评论(0) 推荐(0)
|
||
|
摘要:
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ 阅读全文
posted @ 2016-02-16 23:27 cKK 阅读(111) 评论(0) 推荐(0)
摘要:
Given a sorted linked list, delete all duplicates such that each element appear only once. For example,Given 1->1->2, return 1->2.Given 1->1->2->3->3, 阅读全文
posted @ 2016-02-16 21:31 cKK 阅读(132) 评论(0) 推荐(0)
摘要:
public void reverse (){ Node end =null,p,q; p=head; //p代表当前节点,end代表翻转后p后面的,q代表翻转前p后面的 while(p!=null){ //如果当前节点不为空 q=p.next; //q赋值为p后面的节点 p.next=end; / 阅读全文
posted @ 2016-02-16 14:41 cKK 阅读(272) 评论(0) 推荐(0) |
||