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.
Another question in the same vein as some below: running this in C#, getting correct answers, but the full test suite times out.
For n=20000, m=30000 (above the test limit), this still only takes 808ms. How much faster does it need to be?
Edit: down to 640ms, still no luck.
Here's another one:
My log:
[ 0, 2, 4, 6, 4, 3, 2, 1, 0 ]
Similar case, where the first floor takes on people.
Thanks for that, I don't remember that being there!
As I thought, my solution did give that expected result above. My solution only fails one random test occasionally, and sometimes completely passes. Just rerunning the tests now 'til I get another failed test short enough to see the expected.
Well my solution seems to have deleted itself, so I can't check anymore! But that solution you got seems to match what I got as a result, but the test failed.
Potential issue with Typescript tests.
I have this test case:
which has this solution
According to the question, people can get on the ground floor at the start of the problem. So why does this lift not stop at Floor 3 before proceeding to Floor 5? And in that case, it would also stop at 2 and 4 on the way up.
Done :)
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 comment is hidden because it contains spoiler information about the 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
The two sets of random tests use the exact same generation method, the only difference is the grid size (and hence start/end locations) and the time cutoff.
The only invalid inputs I am aware of would be starting or ending on an Infinity square, which is accounted for in the random tests.
With regards to your particular heuristic issue, could you comment on how your computation was incorrect, so I could add a non-random test case for it?
Agreed :)
Added a couple of grid cases. I suppose there's no harm in them being there, not exactly overwhelming.
This comment is hidden because it contains spoiler information about the solution
Loading more items...