题目描述:给定一个数组,里面除了一个数字,其他的都出现三次。求出这个数字原文描述: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....
分类:
其他好文 时间:
2016-07-31 16:00:13
阅读次数:
120
Additive number is a string whose digits can form additive sequence. A valid additive sequence should contain at least three numbers. Except for the f ...
分类:
其他好文 时间:
2016-07-31 14:32:07
阅读次数:
199
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Example: Given n = 2, return 91. (The answer should be the ...
分类:
其他好文 时间:
2016-07-31 09:09:00
阅读次数:
152
题目描述:给定一个数字n,统计0~n之间的数字二进制的1的个数,并用数组输出例子:For num = 5 you should return [0,1,1,2,1,2].要求:
算法复杂复o(n)
空间复杂度o(n)
原文描述:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num c...
分类:
编程语言 时间:
2016-07-30 01:49:37
阅读次数:
216
题目链接https://leetcode.com/problems/single-number/题目原文
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear ru...
分类:
编程语言 时间:
2016-07-29 15:36:50
阅读次数:
183
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserve the ...
分类:
其他好文 时间:
2016-07-28 14:22:08
阅读次数:
112
1 #! /bin/sh 2 ### BEGIN INIT INFO 3 # Provides: redis-server 4 # Required-Start: $syslog 5 # Required-Stop: $syslog 6 # Should-Start: $local_fs 7 # S ...
分类:
系统相关 时间:
2016-07-23 16:26:25
阅读次数:
257
The size of the hash table is not determinate at the very beginning. If the total size of keys is too large (e.g. size >= capacity / 10), we should do ...
分类:
其他好文 时间:
2016-07-23 07:27:57
阅读次数:
121
Given an integer array, find a continuous subarray where the sum of numbers is the biggest. Your code should return the index of the first number and ...
分类:
其他好文 时间:
2016-07-23 00:36:54
阅读次数:
197
Given an integer matrix, find a submatrix where the sum of numbers is zero. Your code should return the coordinate of the left-up and right-down numbe ...
分类:
其他好文 时间:
2016-07-23 00:27:44
阅读次数:
220