Given n distinct positive integers, integer k (k i) res[i][j][t] = 0;18 else res[i][j][t] = res[i-1][j][t];19 ...
分类:
其他好文 时间:
2015-03-07 06:17:17
阅读次数:
163
Given n unique integers, number k (1> kSumII(int A[], int k, int target) { 9 // write your code here10 ArrayList> res = new ArrayList>...
分类:
其他好文 时间:
2015-03-05 08:04:51
阅读次数:
171
Given a binary search tree and a new tree node, insert the node into the tree. You should keep the tree still be a valid binary search tree.ExampleGi....
分类:
其他好文 时间:
2015-03-05 06:50:40
阅读次数:
143
Given an array with positive and negative integers. Re-range it to interleaving with positive and negative integers.NoteYou are not necessary to keep ...
分类:
其他好文 时间:
2015-03-05 06:50:29
阅读次数:
199
Given n distinct positive integers, integer k (k <= n) and a number target.Find k numbers where sum is target. Calculate how many solutions there are?...
分类:
其他好文 时间:
2015-03-04 12:59:04
阅读次数:
188
Given n unique integers, number k (1<=k<=n) and target. Find all possible k integers where their sum is target.Example
Given [1,2,3,4], k=2, target=5, [1,4] and [2,3] are possible solutions....
分类:
其他好文 时间:
2015-03-04 12:58:47
阅读次数:
126
k SumShow ResultMy Submissionshttp://www.lintcode.com/en/problem/k-sum/题目来自九章算法13%AcceptedGiven n distinct positive integers, integer k (k = 0) { ...
分类:
其他好文 时间:
2015-02-08 09:01:04
阅读次数:
197
Given an integer array, heapify it into a min-heap array.For a heap array A, A[0] is the root of heap, and for each A[i], A[i * 2 + 1] is the left chi...
As the title described, you should only use two stacks to implement a queue's actions.The queue should support push(element), pop() and top() where po...
分类:
其他好文 时间:
2015-02-07 08:03:40
阅读次数:
143
In data structure Hash, hash function is used to convert a string(or any other type) into an integer smaller than hash size and bigger or equal to zer...
分类:
其他好文 时间:
2015-02-07 08:03:20
阅读次数:
244