摘要: Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o... 阅读全文
posted @ 2014-11-23 22:27 Jessica程序猿 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu... 阅读全文
posted @ 2014-11-23 18:35 Jessica程序猿 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Dynamic Programming参考:http://fisherlei.blogspot.com/2012/12/leetcode-jump-game.htmlhttp://blog.csdn.net/linhuanmars/article/details/21354751Given an a... 阅读全文
posted @ 2014-11-23 16:44 Jessica程序猿 阅读(239) 评论(0) 推荐(0) 编辑
摘要: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.C++代码实现:#include#include#include#includeu... 阅读全文
posted @ 2014-11-23 15:16 Jessica程序猿 阅读(160) 评论(0) 推荐(0) 编辑
摘要: Given a collection of integers that might contain duplicates,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.... 阅读全文
posted @ 2014-11-23 11:52 Jessica程序猿 阅读(185) 评论(1) 推荐(0) 编辑
摘要: Given a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must not co... 阅读全文
posted @ 2014-11-23 11:20 Jessica程序猿 阅读(168) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ... 阅读全文
posted @ 2014-11-23 08:56 Jessica程序猿 阅读(181) 评论(0) 推荐(0) 编辑