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, 阅读全文
posted @ 2017-11-29 11:06 binryang 阅读(106) 评论(0) 推荐(0)
摘要:Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. public int divide(int dividend, int di 阅读全文
posted @ 2017-11-22 14:12 binryang 阅读(84) 评论(0) 推荐(0)
摘要: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: [ 阅读全文
posted @ 2017-11-21 20:47 binryang 阅读(95) 评论(0) 推荐(0)
摘要: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 阅读全文
posted @ 2017-11-21 15:55 binryang 阅读(106) 评论(0) 推荐(0)
摘要: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. 阅读全文
posted @ 2017-11-21 14:50 binryang 阅读(81) 评论(0) 推荐(0)