← Questions

Fewest moves across a grid when each move can jump up to k cells

0
MicrosoftCodingLast asked Jun 2026

A coding interview question asked in Microsoft's coding round, last asked Jun 2026. It tests bfs, grids and shortest path.

On an m x n grid of open (0) and blocked (1) cells, you start at (sr, sc) and want to reach (tr, tc). In one move you pick up, down, left or right and travel between 1 and k cells in a straight line; every cell on the way, including the…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Microsoft · Coding · Last asked Jun 202660 min · Ten to fifteen minutes of behavioral questions, then coding in HackerRank where you write a main and make the tests pass; usually three rounds · No AI unless the interviewer invites it; some 2026 loops add a round where you bring your own AI agent

What it tests

bfs · grids · shortest path

Your code and the AI tutor open when you unlock this question.