1 /** 2 * Definition for binary tree with next pointer. 3 * public class TreeLinkNode { 4 * int val; 5 * TreeLinkNode left, right, next; ...
分类:
其他好文 时间:
2014-10-13 14:23:19
阅读次数:
134
Problem Description
You have an array consisting of n integers: a1=1,a2=2,a3=3,…,an=n.
Then give you m operators, you should process all the operators in order. Each operator is one of four types...
分类:
其他好文 时间:
2014-10-12 22:56:58
阅读次数:
311
Problem Description
The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resultin...
分类:
其他好文 时间:
2014-10-12 19:46:59
阅读次数:
205
Problem Description
In the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will ...
分类:
其他好文 时间:
2014-10-12 19:14:08
阅读次数:
208
Overview of the log4j architecture:The architecture of the log4j API is layerd. Each layer consist of different objects performing different task.The ...
分类:
Web程序 时间:
2014-10-12 17:05:38
阅读次数:
224
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
Given an integer n, return all distinct solutions to the n-queens puzzle...
分类:
其他好文 时间:
2014-10-12 16:58:58
阅读次数:
248
N-QueensThen-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all...
分类:
其他好文 时间:
2014-10-12 15:11:58
阅读次数:
263
Given a sorted linked list, delete all duplicates such that each element appear only once.
For example,
Given 1->1->2, return 1->2.
Given 1->1->2->3->3, return 1->2->3.
/**
* Definition for s...
分类:
其他好文 时间:
2014-10-12 13:59:18
阅读次数:
182
Problem
Given a list of space separated words, reverse the order of the words. Each line of text contains L letters and W words.
A line will only consist of letters and space characters. There will...
分类:
其他好文 时间:
2014-10-12 13:11:28
阅读次数:
133
Clone an undirected graph. Each node in the graph contains alabeland a list of itsneighbors.OJ's undirected graph serialization:Nodes are labeled uniq...
分类:
其他好文 时间:
2014-10-12 10:27:37
阅读次数:
135