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.
To add to the pain. My last submission just passed all 78 test cases in 11918ms and then timed out, so it must be on the cusp.
Solved, once comparing to less neighbouring points. I'm sure I'll learn a lot from other solutions.
Haha, I missed the random test text. Thinking about it, I think it only looks like it's stopping at the 2nd large grid because it reaches the max buffer size with a print statement, so the algo might be going further. Is their anyway of outputting how far it gets through the 25 random large grid tests?
Does anyone know how to view the third large grid test case? My algo gets through all the tests up until this one in 2000ms but looks like it falls into an infinite loop on the 3rd large grid, but I can't seem to get an output to see what is going on. Any help would be massively appreciated as the algo gets through 50 random 4000*1 generated turples in less than 5 seconds.
If "node is grid[2][5] # True" then we should be able to set a list of nodes with the grid co-ordinates, rather than having to reference the grid location in the final list of nodes. I suppose this reflects previous comments.
I appreciate your response, however I'm still getting an error even though the contents, type of list and elements are the same. They have the following types:
grid1_optimum_path type = <class 'list'>
Each item is grid1_optimum_path[0] = <class 'setup.Node'>
and my solution, with the following types:
path = <class 'list'>
Each item is path[0] = <class 'setup.Node'>
If the contents are the same how can these two things not be equal?
I have worked out the shortest path from the start_node to end_node in the test, and my function returns the path as a list of nodes yet still my answer says: I don't really know what else to do, I've tried returning the answer is a list of turples and a list of nodes and, any advice?
Your path is not the shortest path.
Try again!:
[(0,0), (0,1), (0,2), (0,3), (1,3), (2,3), (2,2), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4)] should equal
[(0,0), (0,1), (0,2), (0,3), (1,3), (2,3), (2,2), (2,1), (3,1), (4,1), (4,2), (4,3), (4,4)]