包装类(WrapperClass)针对原生数据类型的包装。所有的包装类都位于java.lang包下,Java中的8个包装类分别是Byte,short,integer,long,Float,Double,charactr,boolean,他们的使用方法都是一样的,可以实现原生数据类型与包装类型的双向转换数组(Array):相同类型数据..
分类:
编程语言 时间:
2016-05-20 06:25:14
阅读次数:
251
Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you ...
分类:
其他好文 时间:
2016-05-20 01:02:36
阅读次数:
270
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-05-20 00:50:47
阅读次数:
129
Java集合相关面试问题和答案
面试试题
1.Java集合框架是什么?说出一些集合框架的优点?
每种编程语言中都有集合,最初的Java版本包含几种集合类:Vector、Stack、HashTable和Array。随着集合的广泛使用,Java1.2提出了囊括所有集合接口、实现和算法的集合框架。在保证线程安全的情况下使用泛型和并发集合类,Java已经经历了很久。...
分类:
编程语言 时间:
2016-05-19 23:28:41
阅读次数:
489
Array类可以如下定义: var aValues = new Array(); 如果预先知道数组的长度,可以用参数传递长度 var aValues = new Array(20); 如下2种定义方式是一样的 1 var aColors = new Array(); aColors[0] = "re ...
分类:
编程语言 时间:
2016-05-19 22:58:35
阅读次数:
179
1. Title 283. Move Zeroes 2. Http address https://leetcode.com/problems/move-zeroes/ 3. The question Given an array nums, write a function to move all ...
分类:
其他好文 时间:
2016-05-19 21:17:54
阅读次数:
132
Given an unsorted array of integers, find the length of longest increasing subsequence. For example,Given [10, 9, 2, 5, 3, 7, 101, 18],The longest inc ...
分类:
其他好文 时间:
2016-05-19 19:14:08
阅读次数:
168
Rotate 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 to [5,6,7,1,2,3,4]. Not ...
分类:
其他好文 时间:
2016-05-19 19:09:28
阅读次数:
197
题目大意:求两个字符串的公共子串。 分析: 模板题,将两个字符串接起来用不会出现的字符分割,然后求分属两个字符串的相邻后缀lcp的最大值即可。 代码: program work; type arr=array[0..20001]of longint; var sa,rank,b,tmp,lcp:ar ...
分类:
编程语言 时间:
2016-05-19 15:03:02
阅读次数:
209
jquery数组删除指定元素的方法:grep() 金刚 数组 jquery javascript 元素 遇到的问题 今天遇到一个问题,删除数组中的一个指定元素,并返回新的数组。 我定义的js数组是这样的: var sexList=new Array[3]; sexList[0]="1"; sexLi ...
分类:
编程语言 时间:
2016-05-19 13:13:05
阅读次数:
214