1.面试题43. 1-n整数中1出现的次数 输入一个整数 n ,求1-n这n个整数的十进制表示中1出现的次数. 例如,输入12,1-12这些整数中包含1 的数字有1.10.11和12,1一共出现了5次. 这个题目的核心思想是考虑:每个位是任意数字时,可以包含多少个这个位为1的数字 分了三种情况 class Solution { public int countDigitOne(int n) { //digit表示位因子,就是10.100.1000... long digit=1; int cou…
1.down.52pojie.cn (20160701) (1 in 5) 工具 2.down.52pojie.cn (20160701) (2 in 5) Android VM 6/7 3.down.52pojie.cn (20160701) (3 in 5) ①Android VM 1/7 ②XP VM ③VM full 10.0.3 4.down.52pojie.cn (20160701) (4 in 5) 视频 5.down.52pojie.cn (20160701) (5 in…
从2.6.31内核开始,linux内核自带了一个性能分析工具perf,能够进行函数级与指令级的热点查找. perf Performance analysis tools for Linux. Performance counters for Linux are a new kernel-based subsystem that provide a framework for all things performance analysis. It covers hardware level (CP…
mr自带的例子中的源码SecondarySort,我重新写了一下,基本没变. 这个例子中定义的map和reduce如下,关键是它对输入输出类型的定义:(java泛型编程) public static class Map extends Mapper<LongWritable, Text, IntPair, IntWritable> public static class Reduce extends Reducer<IntPair, NullWritable, IntWritable,…