Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Response from SleepyAsura [https://www.codewars.com/users/SleepyAsura]
I UNDERSTOOD!!!! I will explain:
[5, 4, 3, 2, 1] => Output [4, 3, 2, 1, 0] Let's say the first element is 5. We need to count how many elements on the right are smaller 5!
4, 3, 2, 1 < 5 !!! Therefore, we replace 5 with 4, since there are only 4 elements in the array that are less than five. Next we check 4 and etc.