InterviewDB Experience

Delivery Bot: Simulate a Grid-Based Delivery Robot with Obstacle Avoidance

Interview Experience

Problem A delivery robot moves on an m x n grid. It starts at (0, 0) and must reach (m-1, n-1). Some cells are blocked (obstacles). The robot can move up, down, left, or right one cell per step. Find the shortest path (minimum steps). If no path exists, return -1. If a path exists, also return one valid path as a list of (row, col) tuples. Example: Follow-ups Why is BFS guaranteed to find the shortest path on an unweighted grid? How would you modify this for a weighted grid where each cell has a…

Full Details

🔒

Unlock all Karat questions

Full insider details, leaked discussions, and candidate experiences.

or every company, $100/year →

About This Question

This is a candidate experience report from a karat interview.

It covers the following topics: Coding, Graph, Matrix .