Search
⌘K

Leetcode 2849. Determine if a Cell Is Reachable at a Given Time

On an infinite grid with 8-directional (king) moves, decide if you can reach (fx,fy) from (sx,sy) in exactly t steps. The minimum required steps is the Chebyshev distance d = max(|fx-sx|,|fy-sy|), so it's reachable iff t >= d (with the single exception that start==finish and t==1 is impossible).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.