Merge Sort :归并排序:用递归的思想,分解成单个元素的排序,在归并 代码: import java.util.*; public class MergeSort { public static void main(String[] args) { System.out.println("Hello World!"); int [] a = {3,44,38,5,47,15,36,26,27,2,46,4,19,50,48}; mergeSort(a,0,14); //Syst…
基数排序 package basic.sort; import java.util.Arrays; import java.util.Random; public class RadixSort { /** * use LSD * @param number * @param d key code number in fact is the radix; */ private void radixSort(int[] number, int d) { int k = 0; int n = 1;…