11 2017 档案
摘要:Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [ 2,1, 3,4, 1,2,
阅读全文
摘要:Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. public int divide(int dividend, int di
阅读全文
摘要:Given n pairs of parentheses, write a function to generate all combinations of well formed parentheses. For example, given n = 3, a solution set is: [
阅读全文
摘要:Given an array S of n integers, are there elements a, b, c, and d in S such that a + b + c + d = target? Find all unique quadruplets in the array whic
阅读全文
摘要:Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers.
阅读全文