LeetCode 136. Single NumberGiven an array of integers, every element appears twice except for one. Find that single one. 大意为给定一个整数数组,数组中除了一个元素只有一个外2016-07-28 学习算法
LeetCode 338. Counting BitsGiven a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in the2016-07-28 学习算法
关于异或^异或为相同为 0 相异为 1 例子 010101 ^ 001011 = 011110 规则 a ^ a = 0 ------>幂 a ^ b = b ^ a ------>交换 a ^ 0 = a ------>与0异或 a2016-07-27 Timeliar算法
LeetCode 377. Combination Sum IV给定一个正整数数组,找出所有可以相加得到目标正整数的组合 Example: 给定数组:{1,2,3} 目标数:4 可能情况: {1,1,1,1} {1,1,2},2016-07-27 学习算法