Skip to main content

3 docs tagged with "Simple Algorithms"

View all tags

Bubble Sort

Bubble sort, inversions, sentinel optimization, and bidirectional (cocktail) bubble sort with traces and measurements.

Insertion Sort

Direct insertion sort, why it is adaptive on nearly sorted data, binary insertion sort, and empirical measurements.

Selection Sort

Direct selection sort, why it performs at most n - 1 swaps, why it is not stable, and when its few swaps make it useful.