## Question 1 What is the output if the following array is given as input? colors = [2, 2, 1, 1, 0] ### Options 1. [0, 1, 1, 2, 2] Correct All of the elements of the input array are sorted in the order of 0 (red), 1 (white), and 2 (blue). ---------------------------- 2. [0, 2, 2, 1, 1] Incorrect ---------------------------- 3. [0, 1, 2, 1, 2] Incorrect ---------------------------- 4. [2, 2, 0, 1, 1] Incorrect ---------------------------- --------------------------------------------- ## Question 2 What is the output if the following array is given as input? [2, 2, 0, 1, 2, 2, 0, 2] ### Options 1. [2, 2, 2, 2, 2, 1, 0, 0] Incorrect ---------------------------- 2. [0, 0, 1, 2, 2, 2, 2, 2] Correct All of the elements of the input array are sorted in the order of 0 (red), 1 (white), and 2 (blue). ---------------------------- 3. [0, 0, 2, 1, 2, 2, 2, 2] Incorrect ---------------------------- 4. [1, 0, 0, 2, 2, 2, 2, 2] Incorrect ---------------------------- --------------------------------------------- ## Question 3 What is the output if the following array is given as input? [0, 0, 1, 0, 1, 1, 1, 2, 1, 2] ### Options 1. [0, 0, 1, 0, 1, 1, 1, 1, 2, 2] Incorrect ---------------------------- 2. [0, 0, 0, 1, 1, 1, 1, 2, 2, 1] Incorrect ---------------------------- 3. [0, 0, 1, 0, 1, 1, 1, 2, 1, 2] Incorrect ---------------------------- 4. [0, 0, 0, 1, 1, 1, 1, 1, 2, 2] Correct All of the elements of the input array are sorted in the order of 0 (red), 1 (white), and 2 (blue). ---------------------------- ---------------------------------------------