码迷,mamicode.com
首页 >  
搜索关键字:Arrays    ( 3585个结果
插入排序
package foo;import java.util.Arrays;public class Main { public static void insertionSort(int[] a, int len) { int in, out; int tem...
分类:其他好文   时间:2014-06-21 09:35:44    阅读次数:147
[Leetcode] Median of Two Sorted Arrays
Question:There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity s...
分类:其他好文   时间:2014-06-21 08:34:52    阅读次数:172
初始化的一些问题(Vector使用)
1 import java.util.Vector; 2 import java.util.Iterator; 3 import java.util.Arrays; 4 import java.util.ArrayList; 5 public class VectorDemo{ 6 publ...
分类:其他好文   时间:2014-06-21 07:01:27    阅读次数:176
[leetcode] 4. Median of Sorted Arrays
// Question: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexi...
分类:其他好文   时间:2014-06-21 00:22:23    阅读次数:255
多线程归并排序(摘自githhub)
package com.rationalcoding.sort;import java.util.ArrayList;import java.util.Arrays;import java.util.concurrent.ExecutionException;import java.util.con...
分类:编程语言   时间:2014-06-18 20:33:45    阅读次数:266
[LeetCode] Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ...
分类:其他好文   时间:2014-06-18 17:39:11    阅读次数:260
选择排序
package foo;import java.util.Arrays;public class Main { public static void selectionSort(int[] a, int len) { int in, out, min; fo...
分类:其他好文   时间:2014-06-18 10:31:17    阅读次数:220
LeetCode:Merge Sorted Array
Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold additional ele...
分类:其他好文   时间:2014-06-17 23:05:13    阅读次数:246
计算两个集合的交集数字(java)
循环判断2个数组将相同的公共元素复制到新数组中即可 1 2 3 import java.util.Arrays; 4 5 public class count_same_number { 6 7 public static int[] join(int[] a,int[] b) 8 ...
分类:编程语言   时间:2014-06-17 00:22:18    阅读次数:360
Java中Comparable和Comparator实现对象比较
1.通过Comparable实现排序package Comparable;import java.util.Arrays;public class ComparableUser implements Comparable { private String id; private int ...
分类:编程语言   时间:2014-06-14 13:58:10    阅读次数:212
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!