码迷,mamicode.com
首页 >  
搜索关键字:array    ( 29504个结果
javascript 伪数组和转化为标准数组
1: 什么是伪数组 伪数组是一个含有length属性的json对象, 它是按照索引的方式存储数据, 它并不具有数组的一些方法,只能能通过Array.prototype.slice转换为真正的数组,并且带有length属性的对象。 2:它和数组的关系 都是模拟集合 3:为什么会有伪数组 在日常开发中, ...
分类:编程语言   时间:2017-02-19 18:05:09    阅读次数:210
Array方法归类总结
数组的转换方法 valueOf()方法,数组调用该方法后返回的还是原来的数组。 toString()方法,数组调用该方法后会调用每一项的toStirng()方法,之后将每一项拼接成一个以逗号分割的字符串。 toLocaleString()方法,把数组转换为本地字符串,这个方法与toString()方 ...
分类:其他好文   时间:2017-02-19 12:08:31    阅读次数:195
55 Jump Game i && 45 Jump Game ii
Jump Game Problem statement: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in th ...
分类:其他好文   时间:2017-02-19 10:55:08    阅读次数:201
155. Min Stack
题目: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push element x onto stack. pop() -- R ...
分类:其他好文   时间:2017-02-19 10:47:00    阅读次数:177
C#中x名称空间包含的工具及其作用
在x名称空间下包含三种类型的工具: 一、Attribute类型的工具 二、标签扩展类型的工具 三、XAML指令元素类型的工具 一下列出x名称空间中包含的工具: XAML指令元素 x:Class 新建的WpfApplication中会有这样的XAML语句:x:Class="WpfApplication ...
分类:Windows程序   时间:2017-02-19 10:46:05    阅读次数:265
[LeetCode] 88. Merge Sorted Array
1 class Solution { 2 public: 3 void merge(vector& nums1, int m, vector& nums2, int n) { 4 int i = m - 1; 5 int j = n - 1; 6 int k = m + n - 1; 7 while... ...
分类:其他好文   时间:2017-02-19 10:40:37    阅读次数:168
选择排序
选择排序 用一个索引的位置上的元素与其他索引位置上的元素比较,小的前面,大的在后面. 从0索引开始,依次和后面元素比较,小的往前放,第一次完毕,最小值出现在了最小索引处 图解: 代码实现 public class Demo1_Array { public static void main(Strin... ...
分类:编程语言   时间:2017-02-19 10:28:48    阅读次数:145
二分查找
二分查找 二分查找 :查找元素对应的索引 前提:数组元素有序 折半查找: 图解: 代码实现 案例: public class Demo2_Array { public static void main(String[] args) { int[] arr = {11,22,33,4... ...
分类:其他好文   时间:2017-02-19 10:18:18    阅读次数:141
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 find the maximum profit. You may co ...
分类:其他好文   时间:2017-02-19 10:16:27    阅读次数:182
你根本不会Javascript(1)——类型、值和变量
文原载于szhshp.org/tech/2017/02/18/JavaSprite.html 转载请注明 类型、值和变量 包装对象和原始值 ECMAScript 有 5 种原始类型(primitive type) String 基本类型(null, undefined, bool, number, ...
分类:编程语言   时间:2017-02-19 00:18:56    阅读次数:306
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!