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.
owo recursive, nice
Good point
People commenting you should have stored strings over lists are dumb.
You should have put the same number in your adjacents dictionary though.
That way you can write: "adjacents[observed]" instead of "adjacents[observed] + [observed]"
Goddam that's nerdy
It is kind of to redundant to use a list of strings. A string is already an iterable, so you can just put
'1': '24',
'2': '153,
etc.
See my solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
this is so clever ... i spent 3 hours doing it and had to use itertools :(
I think this is the best practice,since recursive method is the first thing that came up to my mind.Huhhhhh
Python's match() only returns true if the regex matches at the beginning of the string (this is, IMO, insane). The tests should be rewritten to use search() instead.
Yeah... I've had a look, but without knowing Python, it's a bit tricky guessing what the problem is. @jhoffner was the one that wrote it, so perhaps he can have a look..?
In the Python vrsion of the kata, your regex has to match the whole string. That must be a bug in the translation?
You don't have to match the whole string; you just have to make any kind of match. For the JavaScript version,
Mod4.test(str)
is used, so as long as some kind of match is made, you'll pass. Not sure about the other language versions (I didn't write them), but they should be the same.Which language? I only wrote the original JavaScript version...
This comment is hidden because it contains spoiler information about the solution
Loading more items...