摘要:
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... 阅读全文
摘要:
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... 阅读全文
摘要:
Dynamic Programming参考:http://fisherlei.blogspot.com/2012/12/leetcode-jump-game.htmlhttp://blog.csdn.net/linhuanmars/article/details/21354751Given an a... 阅读全文
摘要:
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.C++代码实现:#include#include#include#includeu... 阅读全文
摘要:
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.... 阅读全文
摘要:
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... 阅读全文
摘要:
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 ... 阅读全文