The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:
其他好文 时间:
2015-05-14 23:24:41
阅读次数:
137
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at the head of the list.
对一个数字进行加1运算,这里需要注意进位的情况。按以...
分类:
其他好文 时间:
2015-05-14 20:34:53
阅读次数:
126
题目Given n non-negative integers representing the histogram’s bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.Above is a histogram where width of each ba...
分类:
其他好文 时间:
2015-05-13 19:52:46
阅读次数:
125
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:
其他好文 时间:
2015-05-12 12:52:16
阅读次数:
88
POJ2891 ,Strange Way to Express Integers,线性同余方程组,数论
Elina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following:
Choose k different positive integers a1, a2, …, ak. For so...
分类:
其他好文 时间:
2015-05-12 09:27:12
阅读次数:
183
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining....
分类:
移动开发 时间:
2015-05-12 01:25:09
阅读次数:
143
曾经使用了两年多的Vim,手册也翻过一遍。虽然现在不怎么用vim了,曾经的笔记还是贴出来,与喜欢vim的朋友分享。索
1. 关于Vimvim是我最喜欢的编辑器,也是linux下第二强大的编辑器。 虽然emacs是公认的世界第一,我认为使用emacs并没有使用vi进行编辑来得高效。 如果是初学vi,运行一下vimtutor是个聪明的决定。 (如果你的系统环境不是中文,而你想使用中文的vimtutor...
分类:
其他好文 时间:
2015-05-11 16:10:31
阅读次数:
126
题目描述:
Description:
Count the number of prime numbers less than a non-negative number, n
click to show more hints.
思路:利用厄拉多塞筛法。具体操作:先将 2~n 的各个数放入表中,然后在2的上面画一个圆圈,然后划去2的其他倍数;第一个既未画圈又没有被划去的数是3,将它画圈,...
分类:
其他好文 时间:
2015-05-11 16:08:03
阅读次数:
126
Description:Count the number of prime numbers less than a non-negative number,nclick to show more hints.References:How Many Primes Are There?Sieve of ...
分类:
其他好文 时间:
2015-05-09 13:11:21
阅读次数:
119
Given a non-negative number represented as an array of digits, plus one to the number.The digits are stored such that the most significant digit is at...
分类:
其他好文 时间:
2015-05-08 06:55:03
阅读次数:
120