- Introduction to Challenges
- Insertion Sort 1
- Insertion Sort Itself
- Correctness and the Loop Invariant
- Running Time
-
Counting Sort 1 - Simple Counting Sort
- Prepare for Full Counting Sort
- The Full Counting Sort
-
QuickSort1 - Simple Quick Sort
- Quick-Sort Advanced
- Quick Sort Running Time
Input Format for standard Sorting Challenges:
- t - the number of test cases
- s - the size of the array
- ar - the list of integers
Simple Counting Sort
Collapse Content
Show Content
In a simple sort, the only values that matter are the ones you are sorting. They are not keys to any other values. This makes counting sort very simple. If you already counted the values in the list, you don’t need to access the original list again. This challenge involves a simple counting sort where the elements being sorted are all that matter.
Click for More
Challenge
Using your previous counting code, output the list of integers in order.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.