Given an array of integers, every element
appears twice except for one. Find that single one.Note: Your algorithm should
have a linear runtime complex...
分类:
其他好文 时间:
2014-06-10 21:27:22
阅读次数:
284
Given two sorted integer arrays A and B, merge
B into A as one sorted array.Note:You may assume that A has enough space (size
that is greater or equal...
分类:
其他好文 时间:
2014-06-10 20:44:02
阅读次数:
298
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 c...
分类:
其他好文 时间:
2014-06-10 20:42:48
阅读次数:
315
Question: Mergeksorted linked lists and return
it as one sorted list. Analyze and describe its complexity.Solution: Find the
smallest list-head first....
分类:
其他好文 时间:
2014-06-10 19:51:30
阅读次数:
278
1 class Solution { 2 public: 3 int
singleNumber(int A[], int n) { 4 int bits = sizeof(int)*8; 5 int result=0; 6
for(int i...
分类:
移动开发 时间:
2014-06-10 19:45:48
阅读次数:
334
题目描述Dominos are lots of fun. Children like to stand
the tiles on their side in long lines. When one domino falls, it knocks down the
next one, which k...
分类:
其他好文 时间:
2014-06-10 12:08:55
阅读次数:
232
1 class Solution { 2 public: 3 int
singleNumber(int A[], int n) { 4 int i,j; 5 for(i=0; i<n; i++) 6 { 7 for(j...
分类:
移动开发 时间:
2014-06-10 11:41:55
阅读次数:
259
The count-and-say sequence is the sequence of
integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one
1"or11.11is read off as"tw...
分类:
其他好文 时间:
2014-06-10 10:41:04
阅读次数:
147
Two players, S and T, are playing a game where they make alternate moves. S plays
first.
In this game, they start with an integer N. In each move, a player removes one digit from the integer and p...
分类:
其他好文 时间:
2014-06-10 06:31:29
阅读次数:
302
问题描述:
A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabeti...
分类:
其他好文 时间:
2014-06-10 06:13:21
阅读次数:
299