摘要: 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-12-13 15:16 ElephantKing 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.解题思路:找到链表的中点,作为根,前端作为左子树,后端作为右子树,并对前后做递归操... 阅读全文
posted @ 2014-12-13 12:49 ElephantKing 阅读(105) 评论(0) 推荐(0) 编辑