We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I just figured it out too. Your output should represent the counters like this:
On the first index you must count how many of that index (which is 0 in this case) occurs in the given array.
On the second index you must count how many 1 occurs in the given array.
And so on :) I hope this helps, I couldn't understand this sentence either at first
"The output states that 0 appears 0 times, 1 appears 2 times, 2 appears 0 times, and so on in the given input array."
Counting Sort 1
You are viewing a single comment's thread. Return to all comments →
I just figured it out too. Your output should represent the counters like this: On the first index you must count how many of that index (which is 0 in this case) occurs in the given array. On the second index you must count how many 1 occurs in the given array. And so on :) I hope this helps, I couldn't understand this sentence either at first "The output states that 0 appears 0 times, 1 appears 2 times, 2 appears 0 times, and so on in the given input array."