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.
wow bit shifting so clever
me too, i had the same idea, but it still timed out
Mathematically, it the same, but sometimes, we lose sense with over-refactoring.
how did you derive this solution?
Good Kata :D and way harder than some 3kyu tasks
... or I really suck at bfs
thanks, it is approved
Here's a fork that fixes it
interesting kata, i was able to solve it quickly with brute force in python, don't know if that's intended.
Here is a great explaination how a more efficient algorithm works.
https://math.stackexchange.com/a/2804461/186763
This comment is hidden because it contains spoiler information about the solution
When I first saw this, I was like what??!! :D
AMAZIIIIIINGGGGG
thanks!
one of the few solutions that optimize performance by stopping as soon as the element is found
Added the hint about the origin. Thanks for the suggestion!
Thanks for answering.
I missed this line from description:
(y, x)
is more often used as you iterate first on the rows rather than the columns in a 2D list (see how numpy handles shapes for example, ornumpy.argwhere
method returning indexes).Anyway this line is already in description, my bad.
Nevertheless, in this case, can you also add where is the origin in order to be cristal clear please?
Loading more items...