The basic idea is to maintain a hash table for each elementnuminnums, usingnumas key and its index (1-based) as value. For eachnum, search fortarget -...
分类:
其他好文 时间:
2015-08-15 13:15:53
阅读次数:
204
The Unique MST
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 24152
Accepted: 8587
Description
Given a connected undirected graph, tell if its minimum spa...
分类:
其他好文 时间:
2015-08-15 01:36:53
阅读次数:
209
Rebuilding Roads
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 10066
Accepted: 4595
Description
The cows have reconstructed Farmer John's farm, with its ...
分类:
其他好文 时间:
2015-08-15 00:13:53
阅读次数:
320
Problem DescriptionShaolin temple is very famous for its Kongfu monks.A lot of young men go to Shaolin temple every year, trying to be a monk there. T...
分类:
其他好文 时间:
2015-08-14 21:16:40
阅读次数:
159
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).
For example:
Given binary tree {3,9,20,#,#,15,7},
3
/ 9 20...
分类:
其他好文 时间:
2015-08-14 19:11:16
阅读次数:
88
Given a linked list, remove the nth node from the end of list and return its head.
For example,
Given linked list: 1->2->3->4->5, and n = 2.
After removing the second node from the end, the...
分类:
其他好文 时间:
2015-08-14 17:06:51
阅读次数:
125
Will It Stop?Available memory: 64 MB. Byteasar was wandering around the library of the University of Warsaw and at one of its facades he noticed a pie...
分类:
其他好文 时间:
2015-08-14 13:25:13
阅读次数:
128
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
Show Tags
Show Similar Proble...
分类:
其他好文 时间:
2015-08-14 01:11:52
阅读次数:
136
/*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package java.util;
/**
* The {@co...
分类:
其他好文 时间:
2015-08-14 01:10:03
阅读次数:
118
题目Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example:A -> 1
B -> 2
C -> 3
...
Z -> 26
AA -> 27
AB -> 28
.....
分类:
其他好文 时间:
2015-08-13 22:13:00
阅读次数:
122