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.
Declaring what the type of 'maze' is would be nice. Also, I see most (if not all) solutions split the string into lines by '\n'. A list of lists (or at least list of strings) is easier to work with and makes much more sense in a task like this.
I think
|0
is shorter and less confusing for flooring than>>0
make it maze=="." it works for me
chatGPT probably got the answer from you!
that answer is from way before chatgpt was a thing lol
nice use chatGPT
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?
Хорош;)
Loading more items...