Counting Sort 1


Collapse Content

A comparison sorting algorithm cannot sort in faster than n*log(n) time on average. However, for certain types of input, it is more efficient to use a different type of sorting algorithm, which will make it possible to sort lists even in linear time.
These challenges will cover Counting Sort, a fast way to sort lists where the elements have a small number of possible values, such as integers within a certain range. We will start with an easy task - counting.

Click for More

Challenge

Output the number of times each value appears.

Please sign in or sign up to submit answers.

Alternatively, you can try out Learneroo before signing up.

Contact Us
Sign in or email us at [email protected]