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.
Your post is formatted in reverse, your rext is in a codebox but your code isn't. You might want to read the FAQ for information on how to format posts. Also please mention which programming language you are using next time.
You have just encounted a common mistake. You are sorting an array of strings, which is very different from sorting an array of numbers.
For example
"4"
would be considered higher than"1111"
, because the first char is higher. However when comparing numbers,1111
is clearly a higher value than4
.