栈 1)var a=new Array(),a.push(a,b,...),a.pop() queue 1)var a=new Array(), a.push(a,b,...),a.shift() a.unshift(a,b....),a.pop()反向队列 数组方法 1)由于按照string排序v ...
分类:
Web程序 时间:
2016-08-09 01:56:04
阅读次数:
192
一.问答题 1.返回路径中的文件名部分的函数是什么? 2.改变文件模式的函数是什么? 3.拷贝文件的函数是什么? 4.返回路径中的目录部分的函数是什么? 二.编程题 1.请用三种方法写出函数,获取某个目录下所有文件和文件夹名的关联数组,要求给函数传一个路径参数,返回一个数组,格式为:array('d ...
分类:
Web程序 时间:
2016-08-08 22:30:38
阅读次数:
210
Given an array of non-negative integers, you are initially positioned at the first index of the array. Given an array of non-negative integers, you ar ...
分类:
编程语言 时间:
2016-08-08 22:28:52
阅读次数:
205
Javascript中的数据值有两大类:基本类型的数据值和引用类型的数据值。 基本类型的数据值有5种:null、undefined、number、boolean和string。 引用类型的数据值往大的说就1种,即Object类型。往细的说有:Object类型、Array类型、Date类型、Regex ...
分类:
编程语言 时间:
2016-08-08 20:56:33
阅读次数:
551
<resources> <string name="app_name">MyTest</string> <string-array name="province"> <item>shan dong</item> <item>jiang su</item> <item>an hui</item> <i ...
分类:
其他好文 时间:
2016-08-08 19:01:49
阅读次数:
181
冒泡程序 <!--more--> array = [1, 2, 5, 3, 6, 8, 4] for i in range(len(array) - 1, 0, -1): print i for j in range(0, i): print j if array[j] > array[j + 1] ...
分类:
其他好文 时间:
2016-08-08 17:14:04
阅读次数:
466
数组{ 物以类聚 人以群分 avg sum 数组 数组的概念[ 数组:一组具有相同数据类型的集合 ] 数组的语法[ 先声明 后使用 声明数组: 数据类型+[]+ 变量名 ;/ 数据类型+变量名 +[]; 初始化数组:[ 1 动态初始化 array=new 数据类型[长度]; 系统会为数组中的元素分配 ...
分类:
编程语言 时间:
2016-08-08 14:37:40
阅读次数:
205
对于PHP中对数组的元素进行排序,这个是很经常用到的,之前的项目中也有,而且对于几种排序我们都是用的是asort arsort 等PHP原生函数,没有自己去实现,所以就对一下的几个函数进行总结,这个会不断的进行补充,自己也可以好好的复习和总结。 直接上代码吧! 对于下面的2个对于array的值进行排 ...
分类:
编程语言 时间:
2016-08-08 12:29:10
阅读次数:
233
vector<vector<int>> generate(int num) { vector<vector<int>> result; vector<int> array; for (int i = 1; i <= num; i++) { for (int j = i - 2; j > 0; j-- ...
分类:
其他好文 时间:
2016-08-08 11:00:54
阅读次数:
116
Question:
Given two sorted integer arrays nums1 and nums2,
merge nums2 into nums1 as
one sorted array.
Algorithm:
类似归并排序
Accepted Code:
class Solution {
public:
void merge(vector& nums1, ...
分类:
其他好文 时间:
2016-08-08 09:55:54
阅读次数:
124