The three hands of the clock are rotating every
second and meeting each other many times everyday. Finally, they get bored of
this and each of them wo...
分类:
其他好文 时间:
2014-05-12 05:20:21
阅读次数:
525
原题地址:http://oj.leetcode.com/problems/sum-root-to-leaf-numbers/题意:Given
a binary tree containing digits from0-9only, each root-to-leaf path could
repre...
分类:
编程语言 时间:
2014-05-12 01:28:30
阅读次数:
440
Given an array of words and a length L, format
the text such that each line has exactly L characters and is fully (left and
right) justified.You shoul...
分类:
其他好文 时间:
2014-05-11 15:15:29
阅读次数:
287
Jump Game Given an array of non-negative
integers, you are initially positioned at the first index of the array. Each
element in the array represents ...
分类:
其他好文 时间:
2014-05-10 03:13:50
阅读次数:
481
Populating Next Right Pointers in Each
NodeGiven a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode
*right; TreeLi...
分类:
其他好文 时间:
2014-05-10 00:32:56
阅读次数:
326
题目:
Clone an undirected graph. Each node in the graph contains a label and
a list of its neighbors.
OJ's undirected graph serialization:
Nodes are labeled uniquely.
We use # as a separat...
分类:
其他好文 时间:
2014-05-09 22:31:35
阅读次数:
353
N-Queens IThen-queens puzzle is the problem of
placingnqueens on ann×nchessboard such that no two queens attack each
other.Given an integern, return a...
分类:
其他好文 时间:
2014-05-09 20:34:01
阅读次数:
335
戳我去解题Write an efficient algorithm that searches for
a value in anmxnmatrix. This matrix has the following properties:Integers in
each row are sorted f...
分类:
其他好文 时间:
2014-05-09 08:27:24
阅读次数:
241
题目如下:
Problem D: ShellSort
He made each turtle stand on another one's back
And he piled them all up in a nine-turtle stack.
And then Yertle climbed up. He sat down on the pile.
What a wonderful v...
分类:
其他好文 时间:
2014-05-09 06:20:44
阅读次数:
396
The ? 1 ? 2 ? ... ? n = k problem
The problem
Given the following formula, one can set operators '+' or '-' instead of each '?', in order to obtain a given k
? 1 ? 2 ? ... ? n =...
分类:
其他好文 时间:
2014-05-09 06:10:40
阅读次数:
285