Top 50 shortest path Interview Questions
The most frequently asked shortest path questions across all roles and companies, ranked by real interview frequency. Updated daily.
Use Dijkstra’s algorithm with a priority queue to find the shortest path in a weighted graph with non-negative edges.
SuccessKPI
TikTok Shop
YelpUse BFS to find a shortest four-directional path through an Amazon Robotics warehouse grid.
Motional
High 5 Games
AmazonMaintain a dynamic weighted graph and recompute shortest path after each edge update using Dijkstra and a min-heap.
Palantir technologiesUse Dijkstra's algorithm to find the least-cost collision-free path through a weighted 3D GM Factory ZERO grid.
General Motors (GM)
PrenuvoUse time-aware BFS to find the shortest traversable path through a changing Rockstar Games world grid.
Rockstar Games
The Misch GroupUse depth-first traversal to find the shortest root-to-leaf path with O(h) auxiliary space.
IntuitSign up to see every question
Create a free account to unlock this list and practice real interview questions.
Use BFS to find the minimum eight-direction path through an obstructed 2D grid.
Supermicro
MetaUse Dijkstra's algorithm to find the minimum travel distance between two cities in a weighted graph.
Goldman Sachs Asset & Wealth Management