摘要: Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 阅读全文
posted @ 2016-08-16 19:59 YuriFLAG 阅读(114) 评论(0) 推荐(0)
摘要: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the 阅读全文
posted @ 2016-08-16 09:23 YuriFLAG 阅读(142) 评论(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-08-16 09:16 YuriFLAG 阅读(110) 评论(0) 推荐(0)
摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. For example,Given 1->2 阅读全文
posted @ 2016-08-16 09:09 YuriFLAG 阅读(111) 评论(0) 推荐(0)