Solution: Dutch National Flag Problem
In this review lesson, we will give a detailed analysis of the solutions for the Dutch National Problem.
We'll cover the following...
We'll cover the following...
Solution #1: brute force
Explanation
We have used simple selection sort to rearrange the list in an ascending order. This method is naive and does not cater to the fact that we have just three different digits for this problem.
Time complexity
The time complexity is ...