Back to Questions

Shortest Path Visiting All Nodes

24.2K viewsAsked at Airbnb
Hard

Question Explain

Given a graph, find the length of the shortest path that visits every node. This is a variation of the Traveling Salesperson Problem (TSP) solvable with BFS and Bitmasking DP.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Shortest Path Visiting All Nodes - Interview Question