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: "Dutch national flag problem" – news · newspapers · books · scholar · JSTOR(July 2014) (Learn how and when to remove this message)
The Dutch national flag problem[1] is a computational problem proposed by Edsger Dijkstra.[2] The flag of the Netherlands consists of three colors: red, white, and blue. Given balls of these three colors arranged randomly in a line (it does not matter how many balls there are), the task is to arrange them such that all balls of the same color are together and their collective color groups are in the correct order.
The solution to this problem is of interest for designing sorting algorithms; in particular, variants of the quicksort algorithm that must be robust to repeated elements may use a three-way partitioning function that groups items less than a given key (red), equal to the key (white) and greater than the key (blue). Several solutions exist that have varying performance characteristics, tailored to sorting arrays with either small or large numbers of repeated elements.[3]
^Cite error: The named reference monash was invoked but never defined (see the help page).
^In a chapter of his book A Discipline of Programming Prentice-Hall, 1976
^The latter case occurs in string sorting with multi-key quicksort. Kim, Eunsang; Park, Kunsoo (2009). "Improving multikey Quicksort for sorting strings with many equal elements". Information Processing Letters. 109 (9): 454–459. doi:10.1016/j.ipl.2009.01.007.
and 28 Related for: Dutch national flag problem information
The Dutchnationalflagproblem is a computational problem proposed by Edsger Dijkstra. The flag of the Netherlands consists of three colors: red, white...
for large sets of strings. The name American flag sort comes by analogy with the Dutchnationalflagproblem in the last step: efficiently partition the...
The nationalflag of the Netherlands (Dutch: de Nederlandse vlag) is a horizontal tricolour of red, white, and blue. The current design originates as...
the free dictionary. DNF may refer to: Dutchnationalflagproblem, a computer science–related programming problem proposed by Edsger Dijkstra DNF (software)...
A nationalflag is a flag that represents and symbolizes a given nation. It is flown by the government of that nation, but can also be flown by its citizens...
section above. To solve the Lomuto partition scheme problem (sometimes called the Dutchnationalflagproblem), an alternative linear-time partition routine...
The nationalflag of Japan is a rectangular white banner bearing a crimson-red circle at its center. This flag is officially called the Nisshōki (日章旗,...
A flag carrier is a transport company, such as an airline or shipping company, that, being locally registered in a given sovereign state, enjoys preferential...
known just as "Wilhelmus" (Dutch: Het Wilhelmus; pronounced [ɦɛt ʋɪlˈɦɛlmʏs] ; English translation: "The William"), is the national anthem of both the Netherlands...
The nationalflag of Norway (Bokmål: Norges flagg; Nynorsk: Noregs flagg; lit. 'Norway's flag') is red with a navy blue Scandinavian cross bordered in...
a flag of red and white stripes (varying from nine to thirteen stripes in total), with the flag of England in the canton. The flag caused problems for...
Sun Flag (旭日旗, Kyokujitsu-ki) is a Japanese flag that consists of a red disc and sixteen red rays emanating from the disc. Like the Japanese national flag...
and other members of the royal family. The attack took place on the Dutchnational holiday of Koninginnedag (or Queen's Day). The driver deliberately drove...
Laffite. Flag of pirates captured from the Florida Straits. Flag of Dutch pirates known as the "Bloedvlag". The "Prinsenvlag" used by Dutch pirates. The...
the flag of its direct predecessor state, the Socialist Federal Republic of Yugoslavia (1943–1992). It was similar to an inverted Dutchflag. The flag of...
of that decade. The Dutch endorsed the council's selection of a new national anthem and the Morning Star as the new nationalflag on 1 December 1961....
Retrieved 17 March 2024. "The Logo, Colours and Flag of the African National Congress". African National Congress. Archived from the original on 24 March...
their comrades where. A solution to this problem was the carrying of colourful banners or other insignia. Such flags or banners either showed a personal symbol...
The National Socialist Movement in the Netherlands (Dutch: Nationaal-Socialistische Beweging in Nederland, pronounced [nɑ(t)ʃoːˌnaːlsoːʃaːˈlɪstisə bəˈʋeːɣɪŋ...
(Dutch: Vereenigde Oostindische Compagnie [vərˈeːnɪɣdə oːstˈɪndisə kɔmpɑˈɲi], abbreviated as VOC, Dutch: [veː.oːˈseː]), commonly known as the Dutch East...
Raising the Flag on Iwo Jima (Japanese: 硫黄島の星条旗, Hepburn: Iōtō no Seijōki, lit. 'The Stars and Stripes on Iōtō') is an iconic photograph of six United...
The Pennsylvania Dutch (Pennsylvania Dutch: Pennsylvanisch Deitsche), also referred to as Pennsylvania Germans, are an ethnic group in Pennsylvania and...
Club Brugge Koninklijke Voetbalvereniging (Dutch pronunciation: [klʏˈbrʏɣə ˌkoːnɪŋkləkə ˈvudbɑlvəreːnəɣɪŋ]), known simply as Club Brugge (in English also:...
The Canadian government flew the Dutch tricolour flag on parliament's Peace Tower while its carillon rang out with Dutch music at the news of Princess Margriet's...
Martin, which has its own flag. The Kingdom of the Netherlands has overarching responsibility for foreign relations, defence and Dutch nationality law in the...
of the Sandinistas, they adopted the flag due to the movement's anarchist roots. Orchestral arrangement Problems playing this file? See media help. The...
The Dutch East Indies, also known as the Netherlands East Indies (Dutch: Nederlands(ch)-Indië; Indonesian: Hindia Belanda), was a Dutch colony with territory...
Dutch colonial empire (Dutch: Nederlandse koloniale rijk) comprised the overseas territories and trading posts controlled and administered by Dutch chartered...