码迷,mamicode.com
首页 >  
搜索关键字:Arrays    ( 3585个结果
JavaSE基础学习小结
Java标识符命名规则:1.可以是字母,数字,$,_(下划线),但不可以用数字开头2.包名:全部小写3.类名:每个单词的首字母大写4.变量名:第一个字母小写,以后每个单词的首字母大写5.常量:全部使用大写字母,单词之间用下划线隔开Java类库中操作数组的方法:包:java.util.Arrays方法...
分类:编程语言   时间:2015-06-13 06:18:46    阅读次数:221
Median of Two Sorted Arrays
1. Question找两个有序数组的中位数。时间复杂度O(log(m+n))There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arr...
分类:其他好文   时间:2015-06-12 16:50:06    阅读次数:90
LeetCode 4 Median of Two Sorted Arrays
There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should...
分类:其他好文   时间:2015-06-11 22:38:31    阅读次数:109
Leetcode[4]-Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)).思路:先将两个数组合并,然后排序,最后找中位数中位数:若有n...
分类:其他好文   时间:2015-06-11 14:45:57    阅读次数:90
Arrays.asList()方法
// Collection integers = new ArrayList();//(Arrays.asList(1,2,3,4,5)); Collection integers = new ArrayList(Arrays.asList(1,2,3,4,5));// integers = A.....
分类:其他好文   时间:2015-06-10 21:02:16    阅读次数:141
使用Java语言实现,自动生成10个整数(1~100,求出生成数列中的最大值和最小值,不允许使用Arrays类的sort方法
使用Java语言实现,自动生成10个整数(1~100,求出生成数列中的最大值和最小值,不允许使用Arrays类的sort方法...
分类:编程语言   时间:2015-06-10 10:28:47    阅读次数:217
Leetcode[88]-Merge Sorted Array
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 that is greater or equal to m + n) to hold additional...
分类:其他好文   时间:2015-06-09 13:47:46    阅读次数:114
hdoj 1007 java MLE通不过
参考网上的一个算法,但是一直都是MLE,实在是想不出来什么办法了。参考博客:编程之美寻找最近点对import java.util.Arrays;import java.util.Scanner;public class Main { public static int N=100000; ...
分类:编程语言   时间:2015-06-09 13:38:13    阅读次数:164
Comparable<T> 与 Comparator<T>
这两个都能通过Collections.sort或者Arrays.sort对对象进行排序。Comparable实例由低到高排序 返回1 由高到低排序 返回-1public class Point implements Comparable{ public int x; publ...
分类:其他好文   时间:2015-06-07 23:30:12    阅读次数:186
黑马程序员——集合数组间的转换
------- android培训、 java培训、期待与您交流! --------- 数组转变成集合—— import java.util.Arrays; import java.util.List; public class ArraysDemes {         public static void main(String[] args) { med2(); } p...
分类:编程语言   时间:2015-06-07 09:37:21    阅读次数:115
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!