Question: Assume that after the third loop in Counting - Sort ( the one that accumulates C ) , you have C = [ 2 ,

Assume that after the third loop in Counting-Sort (the one that accumulates C), you have C =[2,5,7,8,11]. Which of the following arrays might have been the input to be sorted?
Options:
[4,1,4,2,3,1,0,3,4,2,1]
[1.0,4,3,0,1,1,2,0,2,4]
[1,0,4,3,1,2,1,0,4,2,4]
[4,4,3,2,1,0,4,2,1,0,1]
[0,4,1,2,3,0,1,2,1,4,4]

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 Programming Questions!