Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without usi...
分类:
其他好文 时间:
2015-01-15 11:03:15
阅读次数:
157
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using ext...
分类:
其他好文 时间:
2015-01-14 23:01:20
阅读次数:
402
问题描述:
Given a binary tree, flatten it to a linked list in-place.
For example,
Given
1
/ 2 5
/ \ 3 4 6
The flattened tree should look like:
...
分类:
其他好文 时间:
2015-01-14 22:54:05
阅读次数:
158
Question:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of t...
分类:
编程语言 时间:
2015-01-14 19:44:13
阅读次数:
323
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.为了方便表头处理,...
分类:
其他好文 时间:
2015-01-14 17:54:36
阅读次数:
242
题目:
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 ...
分类:
编程语言 时间:
2015-01-14 16:58:27
阅读次数:
222
Alex D James 7 May 2009 3:44 PM One of the most common questions we get is how long should an ObjectContext should live. Options often cited include o...
分类:
其他好文 时间:
2015-01-14 14:08:49
阅读次数:
232
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input st...
分类:
其他好文 时间:
2015-01-14 12:50:05
阅读次数:
162
题目Merge Two Sorted Lists通过率33.2%难度EasyMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the ...
分类:
其他好文 时间:
2015-01-14 12:30:19
阅读次数:
159
Given n, generate all structurally unique BST's (binary search trees) that store values 1...n.
For example,
Given n = 3, your program should return all 5 unique BST's shown below.
1 3 ...
分类:
其他好文 时间:
2015-01-14 09:52:27
阅读次数:
150