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.
This was probably one of the simplest ways to do it without digging into regex. nice job.
This should be marked "Puzzles" and not "Algorithms". It's completely underspecified.
aaaand now i'm super-glad i gave this one a pass.
This one lost me, zero interest. "Puzzles" like this where you're "let me begin by printing out all the test case data" are always bad IMHO.
Hey many thanks for your reply and pointers. Sorry I didn't see it till now!
Avoid global variables. They add state between function calls that you may have not anticipated. Your function works on your machine likely because you are only testing one call per program; in that respect, your function is correct. However, this global state interferes with all other calls beyond that first one. Restructure your code to not use global variables (recommended) or make sure you reset all global state on each call.
In c++, all tests passed when tested locally, but failed running test on browser:
should_pass_some_fixed_assertions_involving_simple_mazes
Expected: true
Actual: false
I have a 100 test cases pass before I hit the timeout. Just to get a sense of how close I am, how many total tests are there? 7 initial + 100 random, or much more than that?
Хорош;)
This comment is hidden because it contains spoiler information about the solution
Just what I thought.
I'm an idiot.
This comment is hidden because it contains spoiler information about the solution
That makes a lot of sense. Thank you so much!
Check out the Python docs, especially the "Important warning!"
Thank you so much. Could you explain more as to why the
prev = [(0,0)]
part intrudces a subtle bug? Does it have something to do with how it is stored in global environment as opposed to local one within each iteration of recursion? And why don't I see the same problem with other parameters: i.e.,x=0, y=0
?Loading more items...