← Questions
Grid path from start to target, then the path farthest from a cat
0
I was asked this
No reports yet. Sign in to say where you were asked it.
An N x N grid has a start cell S, a target cell T, water cells and land cells. You move one step up, down, left or right and can never enter water.
- Decide whether you can get from
StoT. - Now a mouse starts at
S, the cheese is atT, and a cat sits still at cellC. The safety of a path is the smallest distance between the cat and any cell on the path. Find the path fromStoTwhose safety is as large as possible and return that safety.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
