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.
I can see that there is a lot of negative opinions about this approach but I am still quite new and still learning so I could someone please explain how this approach even works? I'm not really able to see the connection between how i's sorted ascending order matching the reversed order of n produces the right result...
Thank you in advance for your time and help!
Sorry but at this level a brute force solution IMO it's not Clever or Best Practices.
My solution it's simple and clear.
I agree with predecessors. This solution is not very good in terms of performance for some nastily chosen input data.
Consider n = 10999999999 and try to see how long your 'for' loop would take to reach 19099999999.
even simple test case of 121111111 would knock it out but none of them were made to catch simple brute force loops
It's bug. This solution is not clever. For a big numbers.Tiomeout bitch
I think that brute force solution is no good for 4 kyu task. It was good for 6 kyu task. IMHO
So, the system does not check for a timeout?
Remark : this solution is brute force and will take very long time for big numbers (try it with 898877665544332211L !)