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-09-18 14:53:34
阅读次数:
213
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-09-18 11:24:13
阅读次数:
379
题目 Given a string s,find the longest palindromic substring in S.You may assume that the maximum length of S is 1000,and there exist one unique longes....
分类:
其他好文 时间:
2014-09-17 21:46:02
阅读次数:
238
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
【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
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
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
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-11 17:28:02
阅读次数:
207
Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character '.'.You may assume that there will be o...
分类:
其他好文 时间:
2014-09-11 07:39:41
阅读次数:
161