摘要:
1 class Node { 2 int val; 3 Node next; 4 5 Node(int x) { 6 val = x; 7 next = null; 8 } 9 }10 11 class Stack {12 ... 阅读全文
摘要:
1 public class QuickSortTest{ 2 //比较与交换 3 private static int partition(int[] source, int low, int hight) { 4 int key = source[low]; 5... 阅读全文
摘要:
1 public class InsertSortTest{ 2 public static void InsertSort(int[] source) { 3 //默认第一个元素已排序 4 for (int i = 1; i 0) && (source[... 阅读全文
摘要:
1 public class SelectSortTest { 2 public static void selectSort(int[] source) { 3 for (int i = 0; i source[j]) { 6 s... 阅读全文
摘要:
1 public class BubbleSortTest { 2 //冒泡排序 3 public static void bubbleSort(int[] source) { 4 //外层循环控制控制遍历次数,n个数排序,遍历n - 1次 5 fo... 阅读全文
![](/skins/gray/images/separator.gif)