Home > Term: American flag sort
American flag sort
An efficient, in-place variant of radix sort that distributes items into hundreds of buckets. The first step counts the number of items in each bucket, and the second step computes where each bucket will start in the array. The last step cyclically permutes items to their proper bucket. Since the buckets are in order in the array, there is no collection step. The name comes by analogy with the Dutch national flag problem in the last step: efficiently partition the array into many "stripes". Using some efficiency techniques, it is twice as fast as quicksort for large sets of strings.
- Jenis Kata: noun
- Industri / Domain: Sains komputer
- Kategori: Algorithms & data structures
- Government Agency: NIST
0
Penulis
- GeorgeV
- 100% positive feedback