solution to dutch flag problem