Overview
American Flag Sort is a sorting method that orders values by a named comparison, distribution, merge, or parallel network rule. It is useful when its stability, memory use, parallelism, or data-movement pattern fits the workload.
American Flag Sort orders records with a named compare, partition, or distribution strategy.
Compact metadata for implementation and discovery.
American Flag Sort is a sorting method that orders values by a named comparison, distribution, merge, or parallel network rule. It is useful when its stability, memory use, parallelism, or data-movement pattern fits the workload.
Quick facts
Runtime and memory behavior at a glance.
Best
O(n)
Average
O(n log n)
Worst
O(n log n)
Space
O(n)
Show elements moving through compare, swap, merge, or distribution steps.
American Flag Sort operates in O(n log n) time and O(n) space within the Sorting family. Often compared with Merge Sort and Quick Sort.
What each reference supports for this entry.
Sorting reference for in-place radix sorting, byte-wise buckets, and American-flag style permutation.
Dictionary reference for American flag sort as an in-place radix-sort variant with bucket counting and permutation.
Open sourceGood next jumps from the relationship graph, ranked for useful discovery.
American flag sort is an in-place radix sort variant that counts buckets and permutes items into final bucket ranges.