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.
Where is 8x8 and 9x9 skyscrapers?
What about 2-digit sequences? Do they count?
According to your tests, this grid is invalid:
[1, 0, 0, 0, 0, 0, 4, 7, 0]
[0, 8, 0, 2, 0, 4, 0, 1, 0]
[0, 6, 5, 0, 0, 0, 0, 0, 9]
[0, 0, 0, 0, 0, 1, 0, 9, 0]
[0, 0, 0, 3, 5, 0, 0, 0, 0]
[0, 7, 6, 0, 0, 9, 0, 0, 8]
[2, 0, 0, 5, 0, 0, 7, 4, 0]
[0, 0, 0, 0, 1, 8, 0, 0, 0]
[0, 3, 0, 7, 0, 0, 0, 0, 0]
Edit: OK, scratch that, apparently the problem was caused by another grid, not this one. I updated my solution to deal with those scenarios. Is there a way to delete the previous solution if it turned out to be not 100% correct?
Love these puzzles )) My solution for 6x6 almost worked here, just failed on the "Medved's" test, probably because it didn't have trial and error logic implemented yet. Anyway, after a couple of days of tweaking, I managed to pass all of the tests in about 180ms.
< Deleted >
When trying to run a full test suite I keep getting "DeprecationWarning: Sampling from a set deprecated". I'm not even using any sets in my solution, only lists and a dictionary.
I find it near impossible to check for invalid paths of the "C" type. One thing i tried to do is to document the coordinates of EVERY point I visit (not just corners), but it takes a while to process. Also, it looks like this website intentionally slows things down. Even the bruteforce solution runs pretty fast on my system, but here it times out after just 1 test.
Thanks. I'm not all that familiar with objects tbh. Certainly didn't expect to encounter them on level 8.
I don't get it, why not just give coordinates in the form of tuples? How am I supposed to extract x and y from each point if they are not iterable?
How many tests are there? I manage to pass 360-370 before timing out. Is that even close?