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.
just a mistake, it shouldn't be there (surely a left over of a previous idea while coding)
This comment is hidden because it contains spoiler information about the solution
You mentioned fixed test #38. If, for example, there was an error with a
populate
method that preceded test #38, then those blobs wouldn't be added to the population. But as I said, I've only taken a cursory glance so this might not be the cause of what you're encountering.I've only taken a cursory glance, but it may have to do with invalid inputs:
.
The fact that it's not solvable with straightforward recursive solution doesn't make it a performance kata.
yeah.. I'm looking at how this visually works step by step and I get it (which is good) but I would have NEVER thought to do it this way. I think my brain is still thinking of things in terms of brute force methods. My method loops around in a circle over and over until all list items are used up without ever repeating. This method is like flipping a switch. "add a line, delete the line, flip a switch(move everything), reverse it and repeat."
OP's already solved the kata. Closing.
But did you test it with big inputs, or just run it on a 10x10 array and called it a "success"? With a 400x400 array B4B's solution is 5 times faster than this one, and there're even better solutions out there.
It is actually faster than your solution by a fraction of a second though, Blind4Basics :) I have just compared them and mine wins by 100 ms or so (somewhere at 1050 vs. 1150 ms). Can you show me a solution that actually is faster than this one? I do not insist it follows the optimal algo, but I'd like to have a look at something that is efficient.
you'll reach 1 kyu. One day. If you're persistent. And on your journey there you'll realize how much this solution is actually especially "bad" (performances-wise speaking...) ;)
When things get difficult thats when your suppost to smile :) - zoro
It's fine. Practice makes perfect. Just keep practicing.
the 1 at the end is not necessary code completes without it.
spoiler flag...
Loading more items...