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 ke...
分类:
编程语言 时间:
2015-01-16 10:12:49
阅读次数:
163
一、安装操作系统(略)
注意,我这里用的都是OEL 5u5版本,因为自带了Oracle提供的环境变量安装包,因此可以很方便地进行Oracle软件的安装,因此推荐使用该版本
二、配置本地yum源
--把安装盘mount到media
mount -t iso9660 /dev/cdrom /media
--配置repos添加以下内容
...
分类:
其他好文 时间:
2015-01-16 06:34:00
阅读次数:
252
题目: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.
思路:题目要求的s的一个最长回...
分类:
编程语言 时间:
2015-01-15 23:54:08
阅读次数:
207
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).
Find the minimum element.
You may assume no duplicate exists in ...
分类:
其他好文 时间:
2015-01-15 22:13:10
阅读次数:
176
Given an array of sizen, find the majority element. The majority element is the element that appears more than? n/2 ?times.You may assume that the arr...
分类:
其他好文 时间:
2015-01-15 19:47:58
阅读次数:
110
Given an array of size n, find the majority element. The majority element is the element that appears more than ? n/2 ? times.
You may assume that the array is non-empty and the majority element al...
分类:
其他好文 时间:
2015-01-15 13:02:28
阅读次数:
204
The problem:Given a set ofnon-overlappingintervals, insert a new interval into the intervals (merge if necessary).You may assume that the intervals we...
分类:
其他好文 时间:
2015-01-15 07:03:27
阅读次数:
171
问题描述:
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'...
分类:
其他好文 时间:
2015-01-14 22:53:40
阅读次数:
179
题目
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 ...
分类:
其他好文 时间:
2015-01-14 16:54:36
阅读次数:
183
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...
分类:
其他好文 时间:
2015-01-14 16:44:41
阅读次数:
109