Given a set ofnon-overlappingintervals, insert
a new interval into the intervals (merge if necessary).You may assume that the
intervals were initially...
分类:
其他好文 时间:
2014-06-04 20:10:23
阅读次数:
204
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-06-04 18:18:08
阅读次数:
259
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-06-03 14:00:56
阅读次数:
281
Given inorder and postorder traversal of a
tree, construct the binary tree.Note:You may assume that duplicates do not exist
in the tree./** * Definiti...
分类:
其他好文 时间:
2014-05-30 16:12:22
阅读次数:
288
【题目】
Given a set of non-overlapping intervals, insert a new interval into the intervals (merge if necessary).
You may assume that the intervals were initially sorted according to their start times.
Example 1:
Given intervals [1,3],[6,9], insert and mer...
分类:
其他好文 时间:
2014-05-25 12:56:43
阅读次数:
271
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-05-25 00:46:51
阅读次数:
229
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-05-24 20:43:37
阅读次数:
341
【题目】
Suppose a sorted array is rotated at some pivot unknown to you beforehand.
(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).
You are given a target value to search. If found in the array return its index, otherwise return -1.
You may assume no du...
分类:
其他好文 时间:
2014-05-22 10:43:12
阅读次数:
310
参考别人的code, 看似不难的题,其实挺费事的。思想还是:From this example, we
can see that in the first position of the resulting combinations we can chose
number 1-5. Assume t...
分类:
其他好文 时间:
2014-05-21 14:24:04
阅读次数:
241
SSTACK SEGMENT STACK
DW 32 DUP(?)
SSTACK ENDS
CODE SEGMENT
ASSUME CS:CODE
START: PUSH DS
MOV AX, 0000H
MOV DS, AX
MOV AX, OFFSET MIR7
MOV SI, 003CH ;0FH
MOV [SI], AX
MOV AX, CS
MO...
分类:
其他好文 时间:
2014-05-21 08:09:28
阅读次数:
252