LeetCode 789: Escape The Ghosts
Problem Restatement We start at point: [0, 0] We want to reach: target = [target_x, target_y] There are several ghosts. Each ghost starts at: ghosts[i] = [ghost_x, ghost_y] Each turn, we and all ghosts may move one step north, south, east, or west. Everyone moves at the same speed. We escape only if we reach the target before any ghost can reach us. If we and a ghost arrive at...