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.
Thanks, I'll try that.
not an issue, your code is wrong. ;) (did you considere trying to see what input causes your troubles?)
The best solution is your solution regardless of how many lines you have written. It is still possible to refactor and make it look better. The important thing is that you solved it and its really great man!
Well, look at the bright side: you solved it with 2k LOC, I have no idea how to solve it (did not try tho). Your solution is still better than (non-existent) mine.
The number of lines of code is irrelevant if you are getting the correct result. Mine is a couple of hundred lines half of that is helper functions my solution looks like a caveman compared to the clever ones, but I completed the kata and learned from the clever ones a lot. Do not make your goal to write fewer lines vs clean code that YOU understand. If you have been writing code for a while sure a dozen lines is easy to do. I have to agree 1000-2000 is a bit too much for this kata. My suggestion is that you read the description someone wrote here on the discussion is much clearer than the kata description. Sit down and write the algorithm in a notepad. Maybe even make a flowchart. Also run the test cases and see what's expected. Are you debugging stepping through your code?
Maybe try some easier white kata before coming back to this one.. solutions to this kata don't really need to exceed a couple dozen lines.