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 so much
I'm new to haskell. I get this error:
Can anybody give me a hint?
you could inherit "int" and avoid all that
i liked that system of a down reference
look at the tests
it's simpler than that, do some search and you'll find the idea to solve it.
Also as a general tip, don't ever use mutable data types as default parameters. Instead do this:
def foo(arg = None):
if arg is None:
arg = []
you just need to find the first revisited node, it's as simple as that, and your code shouldn't time out if you get it right, since it's o(n)
This kata was different from most katas I tried, more practical actually, I liked it so much. Too many random tests too, not a bad thing actually.
i liked this kata very much; simple and curious
define a 'cache' decorator or just import from functools
thanks for the comments
my code times out, but the problem is np-complete, wonder what the problem might be...
i corrected that, but still there are some cases that i believe the expected solution is incorrect, like this one:
[12, 30, 21] --> 1 should equal 6
please check this on your own machine and tell me if i'm wrong
oh, i get that now, it raises to the power from right to left. silly mistake! thanks
This comment is hidden because it contains spoiler information about the solution
Loading more items...