A simple comparison-based algorithm that repeatedly steps through the list, compares adjacent elements, and swaps them if they are in the wrong order. It continues until no swaps are needed.
This algorithm divides the list into a sorted and an unsorted region. It repeatedly selects the smallest (or largest) element from the unsorted region and moves it to the end of the sorted region.
A divide-and-conquer algorithm that splits the array into two halves, recursively sorts each half, and then merges the sorted halves back together.
A divide-and-conquer algorithm that selects a "pivot" element and partitions the other elements into two sub-arrays according to whether they are less than or greater than the pivot. It then recursively sorts the sub-arrays.
This algorithm converts the array into a binary heap structure, then repeatedly removes the largest (or smallest) element from the heap and rebuilds the heap until the array is sorted.
A non-comparison-based sorting algorithm that counts the number of occurrences of each distinct element, then calculates the positions of each element in the sorted output.
A non-comparison-based sorting algorithm that sorts numbers digit by digit, starting from the least significant digit to the most significant digit, using a stable sub-sorting algorithm like counting sort for individual digits.