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.
Felt a little hard for 6 kyu. Did anyone manage to do it without memorizing results?
It would have been a fun kata if it hadn't been for the unclear definition of spiral.
Solved it :) Thanks for the explanation!
Can you do B -> A -> B -> G to get (BAG), would that count as part of input(B, 3)? If you can't what is the restriction, you can't traverse the same path? In this case I can go from B -> A but I can't turn back to using the path A -> B.
The combinations part is confusing, does (BDG) and (BGD) count as 1 or 2?
Thanks! Maybe I'll have a lightbulb moment later, really enjoyable kata nonetheless.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
I was timing out so I asked my function to return an arbitrary number without any additional computation, just to do that it took over 8 seconds. Is our algo supposed to run in under 4 seconds? (Python 3.6)
Is there a trick to this? I built sort of the brute force solution (checking a ton of different paths) with optimizations along the way, it works fine but it's timing out.
Should I continue to make optimizations with tons of different cases or is there one neat trick(s) which I'm missing?
No need to spoil the trick, I think a yes/no answer is not a spoiler.
Can we do a brute force solution? My code runs fine but it times out after about 48 tests.
I thought the problem was timing out but the page just freezes.
For python, I think as long as the ouput is a list it should be able to run the tests so I asked the function to return [n] to see if there were big numbers in the test but the page just froze. My solution works fine for the sample tests.
Any suggestions would be greatly appreciated.