Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. The Dutch
national flag problem is a famous computer science related programming
problem proposed by Edsger Dijkstra. The flag of the Netherlands
consists of three colors : Red, White and Blue. Given balls of these
three colors arranged randomly in a line (the actual number of balls
does not matter), the task is to arrange them such that all balls of
same color are together and their collective color groups are in the
correct order. The costs of examining the color of a ball and moving a
ball are so high that each ball can sustain at most one examination and
one movement.