Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.