Sorting Algorithms
Learn about different sorting techniques and their implementations
A simple sorting algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order.
An in-place comparison sorting algorithm that divides the input list into two parts: a sorted sublist and an unsorted sublist.
Builds the final sorted array one item at a time. It's much less efficient on large lists than more advanced algorithms.
An efficient, stable, divide-and-conquer algorithm that divides the input array into two halves, recursively sorts them, and then merges the sorted halves.
An efficient, in-place sorting algorithm that uses a divide-and-conquer strategy with a pivot element to partition the array.
A comparison-based sorting algorithm that uses a binary heap data structure to build a max-heap and then repeatedly extracts the maximum element.
A non-comparison-based sorting algorithm that works well when there is a limited range of input values.