Back to QuestionsPractice with This Question
Shortest Path Visiting All Nodes
24.2K views•Asked 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.