2015年10月9日

摘要: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the original list.For example,Given1->2->3-... 阅读全文
posted @ 2015-10-09 17:03 怕忘记 阅读(165) 评论(0) 推荐(0) 编辑
 
摘要: Follow up for "Remove Duplicates":What if duplicates are allowed at mosttwice?For example,Given sorted arraynums=[1,1,1,2,2,3],Your function should re... 阅读全文
posted @ 2015-10-09 17:02 怕忘记 阅读(203) 评论(0) 推荐(0) 编辑
 
摘要: Given a set of distinct integers,nums, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not... 阅读全文
posted @ 2015-10-09 16:58 怕忘记 阅读(159) 评论(0) 推荐(0) 编辑
 
摘要: Givennnon-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining.Fo... 阅读全文
posted @ 2015-10-09 16:57 怕忘记 阅读(104) 评论(0) 推荐(0) 编辑
 
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.If such arrangement is not possibl... 阅读全文
posted @ 2015-10-09 16:55 怕忘记 阅读(133) 评论(0) 推荐(0) 编辑