码迷,mamicode.com
首页 >  
搜索关键字:Arrays    ( 3585个结果
Collections中sort()方法源代码的简单分析
Collections的sort方法代码: public static void sort(List list, Comparator c) { Object[] a = list.toArray(); Arrays.sort(a, (Comparator)c); ListIterator i = list.listIterator(); for (int j=0; j i.next...
分类:其他好文   时间:2014-07-29 22:08:52    阅读次数:364
用数组模拟栈的结构
package datastruct; import java.util.Arrays; /** * 用数组模拟栈的结构:后进先出(LIFO) 线性表结构 * @author stone * 2014-07-29 06:34:49 */ public class SimulateStack { public static void main(String[] args) {...
分类:其他好文   时间:2014-07-29 22:04:42    阅读次数:359
c语言实现动态指针数组Dynamic arrays
基本原理:事先准备好一个固定长度的数组。如果长度不够的时候,realloc一块区域。另外:在数组元素减少的情况下,需要缩减数组长度。...
分类:编程语言   时间:2014-07-29 14:17:08    阅读次数:301
ACM训练二B题
这是比赛后打的题目,思路很清晰:申明一个结构体,将输入的数复制在这个结构体数组中,排序后比对下标,找到变动的首下标和尾下标,再看这段是否逆序了。Being a programmer, you like arrays a lot. For your birthday, your friends hav...
分类:其他好文   时间:2014-07-29 11:59:56    阅读次数:267
Merge Sorted Array leetcode java(回顾MergeTwoArray和MergeTwoLinkedList)
题目: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 e....
分类:编程语言   时间:2014-07-28 14:47:23    阅读次数:1108
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 b...
分类:其他好文   时间:2014-07-27 22:49:39    阅读次数:176
CodeForces 451B Sort the Array
DescriptionBeing a programmer, you like arrays a lot. For your birthday, your friends have given you an arrayaconsisting ofndistinctintegers.Unfortuna...
分类:其他好文   时间:2014-07-27 22:27:19    阅读次数:219
acm集训训练赛B题【排序+模拟】
一、原题DescriptionBeing a programmer, you like arrays a lot. For your birthday, your friends have given you an arrayaconsisting ofndistinctintegers.Unfor...
分类:其他好文   时间:2014-07-27 22:22:59    阅读次数:317
【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-07-27 09:53:12    阅读次数:350
[leetcode]Merge Sorted Array
Merge Sorted ArrayGiven 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 i...
分类:其他好文   时间:2014-07-25 02:34:44    阅读次数:162
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!