3.2. Comparison-based Sort
Selection sort, heap sort, insertion sort, shell sort.
Selection-based Sort
Selection Sort
public class SelectionSort<T extends Comparable<T>> extends AbstractSort<T> {
public SelectionSort() {
this(Comparator.naturalOrder());
}
public SelectionSort(Comparator<T> comparator) {
super(comparator);
}
}Heap Sort
Insertion-based Sort
Insertion Sort
Shell Sort
Gap Sequence
Implementation
Knuth Sequence
Demonstration
Unit Tests & Benchmarks
Last updated
Was this helpful?