← Questions

Shortest path in a grid with blocked cells

0
UberCodingLast asked Jun 2026

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

Given a grid in which some cells are blocked, return the length of the shortest path from a start cell to a target cell. You move one cell at a time up, down, left or right, never into a blocked cell or off the grid.

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

  • Uber · Coding · Last asked Jun 202660 min · Two rounds; one is often object-oriented design (a parking lot, a meeting scheduler, an expression evaluator) · No AI, except a newer AI-assisted debugging round in some senior loops

What it tests

grids · bfs · shortest path

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