Sort Colors II 原题链接: http://lintcode.com/zh-cn/problem/sort-colors-ii/# Given an array of n objec ...
Sort Colors II 原题链接: http://lintcode.com/zh-cn/problem/sort-colors-ii/# Given an array of n objec ...
K SUM My Submissions http://www.lintcode.com/en/problem/k-sum/ 题目来自九章算法 13% ...
Minimum Adjustment Cost Given an integer array, adjust each integers so that the difference of e ...
Kth Largest Element Find K-th largest element in an array. Note You can swap elements in t ...
First Bad Version http://lintcode.com/en/problem/first-bad-version The code base version is ...
原题链接: binary-tree-preorder-traversal binary-tree-inorder-traversal binary-tree-postorder-tra ...
Fast Power 原题链接:http://lintcode.com/en/problem/fast-power/# Calculate the an % b where a, b and n ...
DP. boolean d[i][j]: For the first i items, can we fill a backpack of size j? true or false ...
Subarray Sum 原题链接:http://lintcode.com/zh-cn/problem/subarray-sum/# Given an integer array, find a ...
直接+没什么好说的,关键在于不用+的操作: 考验Bit Operation, 可以用按位^异或两个操作数对应位以及carry,只是carry是1还是0需要分情况讨论。求更优的解法 ...