You are playing a game on an infinite target
There are several ghosts on the grid, where the ghosts[i]
In each turn, you and every ghost may simultaneously move
If any ghost occupies the same coordinate as you at any turn (including when you reach the destination), you will be intercepted and lose. You successfully escape only if you can reach target before any ghost can catch you, regardless of the movements the ghosts decide to make.
Return true if it is possible to reach target without being intercepted by any ghost, or false otherwise.
Constraints:
ghosts.length
ghosts[i].length
There can be multiple ghosts in the same location.
target.length
You are playing a game on an infinite target
There are several ghosts on the grid, where the ghosts[i]
In each turn, you and every ghost may simultaneously move
If any ghost occupies the same coordinate as you at any turn (including when you reach the destination), you will be intercepted and lose. You successfully escape only if you can reach target before any ghost can catch you, regardless of the movements the ghosts decide to make.
Return true if it is possible to reach target without being intercepted by any ghost, or false otherwise.
Constraints:
ghosts.length
ghosts[i].length
There can be multiple ghosts in the same location.
target.length