This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "American flag sort" – news · newspapers · books · scholar · JSTOR(July 2017) (Learn how and when to remove this message)
An American flag sort is an efficient, in-place variant of radix sort that distributes items into buckets. Non-comparative sorting algorithms such as radix sort and American flag sort are typically used to sort large objects such as strings, for which comparison is not a unit-time operation.[1]
American flag sort iterates through the bits of the objects, considering several bits of each object at a time. For each set of bits, American flag sort makes two passes through the array of objects: first to count the number of objects that will fall in each bin, and second to place each object in its bucket. This works especially well when sorting a byte at a time, using 256 buckets. With some optimizations, it is twice as fast as quicksort for large sets of strings.[1]
The name American flag sort comes by analogy with the Dutch national flag problem in the last step: efficiently partition the array into many "stripes".
^ ab
McIlroy, Peter M.; Bostic, Keith; McIlroy, M. Douglas (1993). "Engineering radix sort" (PDF). Computing Systems. 6 (1): 5–27.
and 24 Related for: American flag sort information
A[j] > mid: swap A[j] and A[k] k ← k - 1 else: j ← j + 1 Americanflagsort "Dutch National Flag problem and algorithm". Faculty of Information Technology...
The Black American Heritage Flag (also known as the African American Heritage Flag) is an ethnic flag that represents the culture and history of African...
This is a list of flags of states, territories, former, and other geographic entities (plus a few non-geographic flags) sorted by their combinations of...
to sort out the details after the current play from scrimmage has concluded. In American football, the flag is yellow; in Canadian football the flag is...
alternating path alternating Turing machine alternation Americanflagsort amortized cost ancestor and American National Standards Institute (ANSI) antichain antisymmetric...
constituent countries, and other non-sovereign territories Click on the "Flag" header to sort by status: first sovereign states, then de facto countries, then...
vociferously denied claims that the flag-raising was staged. "I don't think it is in me to do much more of this sort of thing ... I don't know how to get...
Proxmap sortAmericanflagsort Bucket sort can be mixed with other sorting methods to complete sorting. If it is sorted by bucket sort and insert sort, also...
"Indigenous peoples of the Americas". The term Amerindian, a portmanteau of "American Indian", was coined in 1902 by the American Anthropological Association...
The flag of Europe or European flag consists of twelve golden stars forming a circle on a blue field. It is the official flag of the European Union. It...
messaging app. On May 9, 2018, an Americanflag was burned in the Iranian Parliament amidst chants of 'Death to America' after President Donald Trump withdrew...
The early 1900s saw many calls for the British Empire to adopt a new flag representative of all its dominions, Crown colonies, protectorates, and territories...
Pink Flag is the debut album by the English rock band Wire, released in November 1977. The album was critically acclaimed on release, and has since been...
thereof, such as American Indians from the contiguous United States and Alaska Natives. The United States Census Bureau defines Native American as "all people...
Hollywood. Retrieved June 23, 2017. "A lawsuit helps muzzle John Oliver—sort of", The Boston Globe, June 26, 2017 McCarthy, Tyler (June 26, 2017). "'Celebrity...
Japanese system presents the number 0 by moving flags in a circle, and those from 1 through 9 using a sort of the "rotary dial" system, but different from...
standard US keyboard layout in Microsoft Windows offers no way of inputting any sort of diacritic or accent, this makes it unsuitable for all but a handful of...
The Romani flag or the flag of the Roma (Romani: O styago le romengo, or O romanko flako) is the international ethnic flag of the Romani people, historically...
meaning of the Americanflag, and the reverence of many Americans towards it, was forged by Major Robert Anderson's fight in defense of the flag at the Battle...
Andrew, the patron saint of Burgundy, and a historical banner and battle flag used by holders of the title of Duke of Burgundy and their subjects. It was...
unlike the flag of Israel the symbol is a Temple menorah instead of a Star of David. Another version features a Star of David of a different sort than appears...
of the U.S. flag at the top of the 169 m (554 ft) Mount Suribachi by six U.S. Marines became a famous image of the battle and the American war effort in...
antebellum lore. Flags of the Confederate States of America 1st National Flag [7-, 9, 11-, 13-stars] "Stars and Bars" 2nd National Flag [Richmond Capitol]...