Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:
其他好文 时间:
2014-11-16 01:52:28
阅读次数:
227
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. You may assume that each input would have
exact...
分类:
其他好文 时间:
2014-11-15 20:19:27
阅读次数:
192
Radar Installation
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 54756
Accepted: 12337
Description
Assume the coasting is an infinite straight line. Land...
分类:
其他好文 时间:
2014-11-15 20:19:02
阅读次数:
228
Description
Assume the coasting is an infinite straight line. Land is in one side of coasting, sea in the other. Each small island is a point locating in the sea side. And any radar installation, l...
分类:
编程语言 时间:
2014-11-15 15:37:31
阅读次数:
151
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals were initial...
分类:
其他好文 时间:
2014-11-14 12:06:04
阅读次数:
167
Given two sorted integer arrays A and B, merge B into A as one sorted array.Note:You may assume that A has enough space (size that is greater or equal...
分类:
其他好文 时间:
2014-11-14 09:15:31
阅读次数:
143
Given two sorted integer arrays A and B, merge B into A as one sorted array.
Note:
You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elements from ...
分类:
其他好文 时间:
2014-11-12 23:06:03
阅读次数:
255
Radar Installation
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 54593
Accepted: 12292
Description
Assume the coasting is an infinite straight line. La...
分类:
其他好文 时间:
2014-11-11 08:13:01
阅读次数:
188
Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.后序遍历的最后一个元素就是根...
分类:
其他好文 时间:
2014-11-11 00:40:07
阅读次数:
189
Radar Installation Time Limit:1000MS Memory Limit:10000K Total Submit:2704 Accepted:564Description Assume the coasting is an infinite straight line. L...
分类:
其他好文 时间:
2014-11-10 21:22:02
阅读次数:
207