Question: For an input array [4, 1, 0, 2, 3, 5, 3, 4, 0, 2, 5, 0, 2, 5, 2] the countSort algorithm (version from the
For an input array [4, 1, 0, 2, 3, 5, 3, 4, 0, 2, 5, 0, 2, 5, 2] the countSort algorithm (version from the lecture) was applied. Which statements are true?
1.After the third phase (output), the content of the "counts" array is: [0, 3, 7, 8, 10, 12].
2.After the first phase (counting), the content of the "counts" array is: [3, 1, 4, 2, 2, 3].
3.After the second phase (adding), the content of the "counts" array is: [3, 4, 8, 10, 12, 15].
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
