Minimum Moves
Problem Overview
- Determine the minimum number of moves to reach (n-1, m-1) from (0,0) on a grid, or return -1 if unreachable.
- You can move up to k cells per move in one direction if every stepped-through cell is 0 (no obstacles).
- Input: n×m maze of 0/1 and integer k (1–100); n,m ≤ 100. Output: an integer move count.
- Real-world context: HackerMan navigating the HackerPlay maze.
- An Airbnb interviews coding interview problem and common interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
