摘要:
Given an integers array A. Define B[i] = A[0] * ... * A[i-1] * A[i+1] * ... * A[n-1], calculate B WITHOUT divide operation. Example For A = [1, 2, 3], 阅读全文
posted @ 2016-07-01 11:05
北叶青藤
阅读(375)
评论(0)
推荐(0)
摘要:
Given two sorted integer arrays A and B, merge B into A as one sorted array. Notice You may assume that A has enough space (size that is greater or eq 阅读全文
posted @ 2016-07-01 10:41
北叶青藤
阅读(147)
评论(0)
推荐(0)
摘要:
Remove Duplicates from Sorted Array I Given a sorted array, remove the duplicates in place such that each element appear only once and return the new 阅读全文
posted @ 2016-07-01 08:49
北叶青藤
阅读(157)
评论(0)
推荐(0)
摘要:
560. Subarray Sum Equals K Given an array of integers and an integer k, you need to find the total number of continuous subarrays whose sum equals to 阅读全文
posted @ 2016-07-01 07:57
北叶青藤
阅读(229)
评论(0)
推荐(0)
摘要:
Find the contiguous subarray within an array (containing at least one number) which has the largest product. Example For example, given the array [2,3 阅读全文
posted @ 2016-07-01 05:44
北叶青藤
阅读(202)
评论(0)
推荐(0)
摘要:
Given a sorted (increasing order) array, Convert it to create a binary tree with minimal height. Example Given [1,2,3,4,5,6,7], return 4 / \ 2 6 / \ / 阅读全文
posted @ 2016-07-01 05:31
北叶青藤
阅读(230)
评论(0)
推荐(0)
摘要:
Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return 阅读全文
posted @ 2016-07-01 05:23
北叶青藤
阅读(150)
评论(0)
推荐(0)
摘要:
Given a list of non-negative numbers and a target integer k, write a function to check if the array has a continuous subarray of size at least 2 that 阅读全文
posted @ 2016-07-01 04:55
北叶青藤
阅读(163)
评论(0)
推荐(0)
摘要:
Cosine similarity is a measure of similarity between two vectors of an inner product space that measures the cosine of the angle between them. The cos 阅读全文
posted @ 2016-07-01 03:11
北叶青藤
阅读(532)
评论(0)
推荐(0)
摘要:
Flatten a binary tree to a fake "linked list" in pre-order traversal. Here we use the right pointer in TreeNode as the next pointer in ListNode. For e 阅读全文
posted @ 2016-07-01 02:31
北叶青藤
阅读(275)
评论(0)
推荐(0)

浙公网安备 33010602011771号