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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!