Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.难度:95,参考了网上的思路。...
分类:
其他好文 时间:
2014-09-16 12:09:00
阅读次数:
174
Insert Interval
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 t...
分类:
其他好文 时间:
2014-09-15 17:51:09
阅读次数:
264
Given a binary tree, find the maximum path sum.
The path may start and end at any node in the tree.
For example:
Given the below binary tree,
1
/ 2 3
Return 6....
分类:
其他好文 时间:
2014-09-15 12:58:38
阅读次数:
168
【leetcode】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 exactly one solution....
分类:
其他好文 时间:
2014-09-15 10:06:18
阅读次数:
192
一、判断AdminServer.lok被其进程锁死 >weblogic.management.ManagementException: Unable to obtain lock on *******/AdminServer.lok. Server may...
分类:
Web程序 时间:
2014-09-15 10:03:18
阅读次数:
272
Problem Description
In our daily life we often use 233 to express our feelings. Actually, we may say 2333, 23333, or 233333 ... in the same meaning. And here is the question: Suppose we have a matrix...
分类:
其他好文 时间:
2014-09-14 23:42:47
阅读次数:
342
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.
You may assume no duplicates in the array....
分类:
其他好文 时间:
2014-09-14 22:10:17
阅读次数:
146
1.依赖头文件
#include
#include
2.函数定义:
int truncate(const char *path,off_t length);
int ftruncate(int fd,off_t length);
函数说明:
The truncate() and ftruncate() functions cause the regular file named...
分类:
系统相关 时间:
2014-09-14 19:20:57
阅读次数:
289
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2014-09-14 12:49:37
阅读次数:
214
The string "PAYPALISHIRING" is
written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font for better legibility)
P A H N
A P L S I ...
分类:
其他好文 时间:
2014-09-13 22:52:36
阅读次数:
209