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
class Solution {public: int reverse(int x) { bool negative_flag=false; if(x==INT_MIN) return 0; if(xINT_MAX) return 0; if(negative_f...
分类:
其他好文 时间:
2015-05-09 19:03:41
阅读次数:
84
Sampling该模式会定期的访问栈,评估出运行较慢的代码。该模式没有方法的调用次数记录,仅有cpu耗时。该模式是在进行提供瓶颈分析中最好的模式,对服务器额外开销最小。Tracing应用Tracing模式,被监控应用的每一个方法都会被转化成字节码记录其消耗CPU的情况。方法调用次数和CPU耗时都被记录下来。
但是tracing模式对服务器影响较大。
被检测服务的方法越多,对服务器性能影响越大Ca...
分类:
其他好文 时间:
2015-05-09 15:01:43
阅读次数:
113
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
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2015-05-09 07:42:26
阅读次数:
124
Givennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histog...
分类:
其他好文 时间:
2015-05-09 01:13:01
阅读次数:
169
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
Problem:
Given n non-negative integers a1, a2,
..., an, where each represents a point at coordinate (i, ai). n vertical
lines are drawn such that the two endpoints of line i is at (i, ai) and...
分类:
编程语言 时间:
2015-05-08 00:05:11
阅读次数:
129