![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Algorithms
WilliamandUrey2014
这个作者很懒,什么都没留下…
展开
-
Sorting -- MergeSort
public class MergeSort { public static void sort(int[] numbers) { divide(numbers, 0, numbers.length-1); } // divide the array into half public static void divide(int[] numbers, int l,原创 2014-10-02 07:22:29 · 322 阅读 · 0 评论 -
Sorting -- BucketSort
public class BucketSort { public static void sort(int[] numbers, int d) { // d is the largest number of digit int k = 0, n = 1; int m = 1; int[][] tmp = new int[10][numbers.length]原创 2014-10-03 01:49:48 · 266 阅读 · 0 评论 -
Sorting -- BubbleSort
public class BubbleSort { public static void sort(int[] numbers) { int len = numbers.length; for (int i=0; i<len; i++) { for (int j=0; j<len-1; j++) { if (numbers[j] > numbers[j+1]原创 2014-10-03 01:48:44 · 293 阅读 · 0 评论