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.
This is not an efficient sorting method because we would have to compare all the values in order to find the largest value to create the frequency array. Which is basically what quicksort does. If you already know the largest value, like they gave us 100, Yep, then it is more efficient. Cool exercise, but it is kind of confusing.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Counting Sort 1
You are viewing a single comment's thread. Return to all comments →
This is not an efficient sorting method because we would have to compare all the values in order to find the largest value to create the frequency array. Which is basically what quicksort does. If you already know the largest value, like they gave us 100, Yep, then it is more efficient. Cool exercise, but it is kind of confusing.