Input: [2, 0, 1, 1, 0, 2, 1, 0]
Output: [0, 0, 0, 1, 1, 1, 2, 2]
Design a sorting algorithm to arrange an array of 0s, 1s, and 2s in ascending order (Dutch National Flag Problem)
Input: [2, 0, 1, 1, 0, 2, 1, 0]
Output: [0, 0, 0, 1, 1, 1, 2, 2]
Design a sorting algorithm to arrange an array of 0s, 1s, and 2s in ascending order (Dutch National Flag Problem)