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 equa...
分类:
其他好文 时间:
2014-11-29 07:00:12
阅读次数:
193
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.Solution: 1 /**...
分类:
其他好文 时间:
2014-11-29 01:31:14
阅读次数:
256
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 nodes with keys less than the node's key.Th...
分类:
其他好文 时间:
2014-11-27 16:30:19
阅读次数:
226
题目描述:
Given a string S,
find the longest palindromic substring in S.
You may assume that the maximum length of S is
1000, and there exists one unique longest palindromic substring.
解题思路:...
分类:
其他好文 时间:
2014-11-27 14:36:22
阅读次数:
187
【原题】
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
【解析】
题意:根据二叉树先序遍历和中序遍历的结果,构造二叉树。跟 根据中序遍历和后序遍历结...
分类:
其他好文 时间:
2014-11-27 12:50:15
阅读次数:
155
【题目】
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-27 10:48:01
阅读次数:
117
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longes...
分类:
其他好文 时间:
2014-11-27 07:59:55
阅读次数:
184
assume 最典型的用法:是指明变量与段寄存器的联系,比如 assume ds:data,它是告诉编译器以后所有在data段中定义的变量寻址时,使用ds作为段地址,但是它不对程序作任何事,比如你必须自己对ds赋值,这也就是为什么dos下典型的汇编段如下: .data ........ .co...
分类:
其他好文 时间:
2014-11-26 18:37:56
阅读次数:
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-26 16:29:34
阅读次数:
164
点击打开题目
Radar Installation
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 54970
Accepted: 12381
Description
Assume the coasting is an infinite strai...
分类:
其他好文 时间:
2014-11-26 11:17:24
阅读次数:
225