JS中变量的类型有:数值型、字符型、布尔型、undefined、null、array、object、function 1、数值型:可以进行算术运算的(加、减、乘、除) 数值型包括:整型(整数)和浮点型(小数)。 2、字符型:用单引号或双引号引起来的一个字符串 注意:字符型变量不能进行算术运算,只能进 ...
分类:
Web程序 时间:
2016-09-11 18:47:35
阅读次数:
200
Follow up for "Remove Duplicates":What if duplicates are allowed at most twice? For example,Given sorted array nums = [1,1,1,2,2,3], Your function sho ...
分类:
其他好文 时间:
2016-09-11 17:07:11
阅读次数:
121
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space fo ...
分类:
其他好文 时间:
2016-09-11 14:19:34
阅读次数:
99
121. Best Time to Buy and Sell Stock 121. Best Time to Buy and Sell Stock Say you have an array for which the ith element is the price of a given stoc ...
分类:
其他好文 时间:
2016-09-11 07:54:14
阅读次数:
105
Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array. Note:You may assume that nums1 has enough space (size tha ...
分类:
其他好文 时间:
2016-09-11 06:50:19
阅读次数:
156
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 example, giv ...
分类:
其他好文 时间:
2016-09-11 06:49:06
阅读次数:
185
1. 问题描述 189. Rotate ArrayRotate an array of n elements to the right by k steps.For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated ...
分类:
其他好文 时间:
2016-09-11 01:24:10
阅读次数:
142
数组什么是数组?计算机中的数组指的是具有相同类型的若干变量按照一定的顺序组织起来的一种数据类型。通俗点来说数组就是变量的一种,按现在的术语来说就是变量圈子中的一个,只不过这个变量圈子都是相同类型的变量并有一定的组织顺序。数组的格式array[key]=valuearray:表示..
分类:
编程语言 时间:
2016-09-10 22:24:11
阅读次数:
211
The foreach construct provides an easy way to iterate over arrays. foreach works only on arrays and objects, and will issue an error when you try to u ...
分类:
其他好文 时间:
2016-09-10 19:07:28
阅读次数:
132
链接遍历NSArray正向遍历 for (id object in array)反向遍历for (id object in [array reverseObjectEnumerator])如果在遍历中修改先计算出array的count,然后使用for循环。在for循环中记录需要修改的index,然后... ...
分类:
其他好文 时间:
2016-09-10 17:54:11
阅读次数:
140