<aside> 💡 Frequency is the keyword

</aside>


First step

Find the largest element of your array.


Second step

Create an auxiliar array the size of the largest element.


Place the elements frequency in their positions

The frequency of the element 2 is placed on the index 2. If it appears 10 times in the array, the 1o is placed in the index 2.


Create an output array

Put your ordered elements (based on it’s index)


Pass the elements to the output array

Place the element in the output array, then decrease its frequency on the frequency array.


See more about it