摘要:
Swap Nodes | Given a linked list, swap every two adjacent nodes and return its head. Example Given 1->2->3->4, you should return the list as 2->1->4-> 阅读全文
posted @ 2016-07-05 12:24
北叶青藤
阅读(192)
评论(0)
推荐(0)
摘要:
Given a list of non negative integers, arrange them such that they form the largest number. Notice The result may be very large, so you need to return 阅读全文
posted @ 2016-07-05 09:48
北叶青藤
阅读(191)
评论(0)
推荐(0)
摘要:
Best Time to Buy and Sell Stock I Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted t 阅读全文
posted @ 2016-07-05 09:14
北叶青藤
阅读(239)
评论(0)
推荐(0)
摘要:
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or 阅读全文
posted @ 2016-07-05 09:02
北叶青藤
阅读(200)
评论(0)
推荐(0)
摘要:
Given a sorted array of n integers, find the starting and ending position of a given target value. If the target is not found in the array, return [-1 阅读全文
posted @ 2016-07-05 08:56
北叶青藤
阅读(138)
评论(0)
推荐(0)
摘要:
There are two sorted arrays A and B of size m and nrespectively. Find the median of the two sorted arrays. There are two sorted arrays A and B of size 阅读全文
posted @ 2016-07-05 07:55
北叶青藤
阅读(207)
评论(0)
推荐(0)
摘要:
Given two values k1 and k2 (where k1 < k2) and a root pointer to a Binary Search Tree. Find all the keys of tree in range k1 to k2. i.e. print all x s 阅读全文
posted @ 2016-07-05 06:09
北叶青藤
阅读(202)
评论(0)
推荐(0)
摘要:
Design an algorithm and write code to serialize and deserialize a binary tree. Writing the tree to a file is called 'serialization' and reading back f 阅读全文
posted @ 2016-07-05 06:06
北叶青藤
阅读(180)
评论(0)
推荐(0)
摘要:
Combination Sum | Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to 阅读全文
posted @ 2016-07-05 04:46
北叶青藤
阅读(254)
评论(0)
推荐(0)
摘要:
Backpack | Given n items with size Ai, an integer m denotes the size of a backpack. How full you can fill this backpack? Given n items with size Ai, a 阅读全文
posted @ 2016-07-05 04:35
北叶青藤
阅读(227)
评论(0)
推荐(0)
摘要:
Jump Game | Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represent 阅读全文
posted @ 2016-07-05 03:18
北叶青藤
阅读(179)
评论(0)
推荐(0)
摘要:
Given an unsorted array of integers, find the length of the longest consecutive elements sequence. Clarification Your algorithm should run in O(n) com 阅读全文
posted @ 2016-07-05 01:48
北叶青藤
阅读(185)
评论(0)
推荐(0)
摘要:
k Sum Given n distinct positive integers, integer k (k <= n) and a number target. Find k numbers where sum is target. Calculate how many solutions the 阅读全文
posted @ 2016-07-05 00:55
北叶青藤
阅读(250)
评论(0)
推荐(0)

浙公网安备 33010602011771号