摘要: 题目: You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stoppin 阅读全文
posted @ 2017-04-22 17:15 Vincent丶丶 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目: 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,- 阅读全文
posted @ 2017-04-18 22:30 Vincent丶丶 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 题目: Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2, 阅读全文
posted @ 2017-04-18 20:42 Vincent丶丶 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of n integers where n > 1, nums, return an array output such that output[i] is equal to the product of all the elements of nums exc 阅读全文
posted @ 2017-04-18 19:46 Vincent丶丶 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 题目: Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after rain 阅读全文
posted @ 2017-04-17 21:03 Vincent丶丶 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 题目: Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two e 阅读全文
posted @ 2017-04-16 14:03 Vincent丶丶 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 题目: There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexit 阅读全文
posted @ 2017-04-16 13:16 Vincent丶丶 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 题目: Given four lists A, B, C, D of integer values, compute how many tuples (i, j, k, l) there are such that A[i] + B[j] + C[k] + D[l] is zero. To make 阅读全文
posted @ 2017-04-15 22:17 Vincent丶丶 阅读(464) 评论(0) 推荐(0) 编辑
摘要: 题目: Given an array of n integers nums and a target, find the number of index triplets i, j, k with 0 <= i < j < k < n that satisfy the condition nums[ 阅读全文
posted @ 2017-04-15 21:00 Vincent丶丶 阅读(185) 评论(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 integ 阅读全文
posted @ 2017-04-15 20:23 Vincent丶丶 阅读(229) 评论(0) 推荐(0) 编辑