还有很多代码要写
JS顺序插入数组 JS顺序插入数组
给一个数组和一个数字,将数字插入数字指定位置,使数组有序,不使用遍历 function insert(array, num) { var middle = Math.round(array.length / 2);
2016-08-04
LeetCode 136. Single Number LeetCode 136. Single Number
Given an array of integers, every element appears twice except for one. Find that single one. 大意为给定一个整数数组,数组中除了一个元素只有一个外
2016-07-28
LeetCode 338. Counting Bits LeetCode 338. Counting Bits
Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in the
2016-07-28
LeetCode 377. Combination Sum IV LeetCode 377. Combination Sum IV
给定一个正整数数组,找出所有可以相加得到目标正整数的组合 Example: 给定数组:{1,2,3} 目标数:4 可能情况: {1,1,1,1} {1,1,2},
2016-07-27