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.
Totally agree man, and well thanks for starting the initiative and giving lead on this one, helped a lot.
I'm also getting a timeout error, cause of the large numbers.
if they have the same weight,ypu have to compare them according string ascii code
I googled basic java stuff bc I forgot a lot of stuff but nothing specifically related to the problem does that count 😂
@VaxiZ: with your reasoning, nothing's wrong with bogosort, which is, to say the least, arguable.
FWIW I have the complete opposite view; I think it's amazing to realise that mathematicians working hundreds of years ago with pen and paper (or even thousands of years ago using sticks in the sand like Euclid) could come up with "algorithms" that are faster than what a decent brute-force programmer can do with a modern computer -- if that isn't motivation to learn more from the "math" katas, I don't know what is!
Also, nothing wrong with Opel Astras >:(
Try harder. (Or less harder) The solution is easier than it seems.
I don;t think I agree with your analogy, because comparison of a programming task to a car race is IMO not very good. I would have a different one: you hire a contractor to renovate or build you a house. One contractor performed the task and built your house in half a year. Another one finished identical house in 150 years. Would you consider any of them as better?
Using an efficient, potentially math based approach is just a right way to do the job. Looping a bajillion of times might give the same result, but is so far from feasible it's difficult to even consider it correct.
.
10003
is before22
as a string.
Your code not working is not a kata issue (= a bug in the kata). See the documentation: https://docs.codewars.com/training/troubleshooting/