1.题目大意 Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. For examp ...
分类:
编程语言 时间:
2016-10-29 14:13:16
阅读次数:
303
123. Best Time to Buy and Sell Stock III Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm t ...
分类:
其他好文 时间:
2016-10-29 01:58:27
阅读次数:
218
121. Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitte ...
分类:
其他好文 时间:
2016-10-29 01:29:01
阅读次数:
161
Description Input Output 每次x=1时,每行一个整数,表示这次旅行的开心度 每次x=1时,每行一个整数,表示这次旅行的开心度 Sample Input 4 1 100 5 551 1 2 2 1 2 1 1 2 2 2 3 1 1 4 Sample Output 101 11 ...
分类:
其他好文 时间:
2016-10-29 01:27:02
阅读次数:
148
122. Best Time to Buy and Sell Stock II Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to ...
分类:
其他好文 时间:
2016-10-29 01:22:14
阅读次数:
129
<html><head><script>var array=[1,'a',true,10.1];//alert(array);//alert(array.length);//for(i=0;i<array.length;i++)//{//alert(array[i]);//}//for(var i ...
分类:
编程语言 时间:
2016-10-28 22:41:47
阅读次数:
180
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 给一个排好序的数组,然后求搜索二叉树 其实就是二分法,不难。 ...
分类:
编程语言 时间:
2016-10-28 22:37:43
阅读次数:
150
1.1 Kotlin的身世写了许久 Java,有没有发现其实你写了太多冗余的代码?后来你体验了一下 Python,有没有觉得不写分号的感觉真是超级爽?你虽然勤勤恳恳,可到头来却被 NullPointe...
分类:
其他好文 时间:
2016-10-28 17:48:58
阅读次数:
350
一、object 遍历: for(var key in object){ console.log(key)//key=='a' console.log(object.[key])//[key]==['a'] } 注意, object.key==object['key']表示的是object里面一个叫 ...
分类:
Web程序 时间:
2016-10-28 09:50:29
阅读次数:
253