摘要: 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, return1->2->3.Solution: 1 /** 2 * Definition for singly-linked list. 3 * public class ListNode { 4 * int val; 5 * ListNode next 阅读全文
posted @ 2013-01-30 16:41 cradle 阅读(148) 评论(0) 推荐(0) 编辑
摘要: all kinds of traversals for binary tree 阅读全文
posted @ 2013-01-30 02:38 cradle 阅读(861) 评论(0) 推荐(0) 编辑