Neocortex 🧠

Search

Search IconIcon to open search

Radix Sort

Last updated Dec 24, 2021 Edit Source

Radix sort is a non-comparison based sorting algorithm, it allows us to do stable sorting in a fast manner for elements that are more complicated than integers. In radix sort, when sorting a list of tuples with two elements, Bucket Sort is applied two times, once for the second element, and once for the first one.This way, the elements with the same first elements are consecutive and ordered according to their second elements. This algorithm allows for a lexicographic sorting of a list with $n$ tuples, each element of the tuples being in the range $[0,N-1]$ in $O(n+N)$ time.


Interactive Graph