Package ch.hslu.exercises.sw09
Class Sort
java.lang.Object
ch.hslu.exercises.sw09.Sort
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
arraysParallelSort
(int[] arr) static void
bubbleSort
(int[] arr) static void
bubbleSort2
(int[] arr) static void
insertionSort
(int[] array) static void
insertionSort2
(int[] arr) Optimized Insertion Sort.static void
selectionSort
(int[] arr) static void
shellSort
(int[] arr) static void
shellSort2
(int[] arr) static void
shellSort3
(int[] arr)
-
Method Details
-
insertionSort
public static void insertionSort(int[] array) -
insertionSort2
public static void insertionSort2(int[] arr) Optimized Insertion Sort.- Parameters:
arr
- Array of integers to be sorted in-place.
-
selectionSort
public static void selectionSort(int[] arr) -
bubbleSort
public static void bubbleSort(int[] arr) -
bubbleSort2
public static void bubbleSort2(int[] arr) -
arraysParallelSort
public static void arraysParallelSort(int[] arr) -
shellSort
public static void shellSort(int[] arr) -
shellSort2
public static void shellSort2(int[] arr) -
shellSort3
public static void shellSort3(int[] arr)
-