This should be upvoted as best practice. Yes, not a one-liner, but the array length is not hardcoded, either.
Well, I´m feeling stupid right now. Never knew toLocaleString() existed. I feel like is cheating due to how easily solves the kata. Anyway, I just learned a new thing.
That would work. However, it is a solution inefficient in terms of memory, as you are creating another list having the same size of the original.
There are better ways, as seen in other people's solutions.
This comment is hidden because it contains spoiler information about the solution
Cool! I didn't know you could do that with sort.
It also isn't currently accepted as a solution.
Great solution. Upvoted!
how does it work?
The solution modifies input.
Won't work for linked list with 1000+ length.
why we do this:
all characters have already been lower (recede) , haven't them?
sorry for my English:(
Maybe use tail recursion can avoide this problem.