Escape Grid with Fire and Waiting Time
Asked at Snapchat · Coding Questions · Difficulty: Hard · Last asked Feb 24, 2026
You stand in the top-left cell of a grid and must reach a safehouse in the bottom-right cell. Some cells are on fire, and the fire spreads one cell per minute. Before you start moving you may wait at the start for a number of whole minutes. Find the longest wait that still lets you reach the safehouse.
Loading the problem…