博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
排序算法之-基数排序
阅读量:4184 次
发布时间:2019-05-26

本文共 541 字,大约阅读时间需要 1 分钟。

 

public static void radixSort(int[] arr, int d)   {      int i;      // current digit found by dividing by 10^power      int power = 1;      // allocate 10 null references to a LinkedQueue      LinkedQueue[] digitQueue = new LinkedQueue[10];      // initialize each element of digitQueue to be      // an empty queue      for (i=0;i < digitQueue.length;i++)         digitQueue[i] = new LinkedQueue();      for (i=0;i < d;i++)      {         distribute(arr, digitQueue, power);         collect(digitQueue, arr);         power *= 10;      }   }

 

转载地址:http://lqboi.baihongyu.com/

你可能感兴趣的文章
Spring MVC 和 Servlet 一样,都不是线程安全的
查看>>
Java线程:线程的同步与锁
查看>>
Mac、Windows可以互相远程
查看>>
oracle提示 ORA-12154: TNS: 无法解析指定的连接标识符
查看>>
oracle 插入数据时提示没有足够的值
查看>>
Oracle Net Manager的使用及配置
查看>>
镜像文件
查看>>
苹果笔记本桌面下面的工具栏没了怎么调出来
查看>>
CSS原理与CSS经验分享
查看>>
oracle中int与number的区别
查看>>
php不用jsonp也能跨域
查看>>
solr作为一种开源的搜索服务器
查看>>
Pig分析数据过程
查看>>
linux下文件夹的创建、复制、剪切、重命名、清空和删除命令
查看>>
pentaho套件
查看>>
软件产品经理职责
查看>>
Linux下Tomcat的安装配置
查看>>
UI即User Interface
查看>>
大数据要学习知识
查看>>
Elasticsearch Java API总汇
查看>>