Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Leetcode 847. Shortest Path Visiting All Nodes
Find the minimum number of steps in a walk that visits every node of an undirected connected graph (n ≤ 12), where revisiting nodes/edges is allowed. This is solved by searching the shortest path in the augmented state space (current node, visited-node bitmask) — typically via BFS/bitmask DP over O(n·2^n) states.
Asked at:
Intuit
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late October, 2025
Intuit
Senior
Early August, 2025
Mid-level
Late November, 2024
Mid-level
Find the shortest path visiting all nodes in a graph using BFS, with a hard follow-up involving a constructive algorithm
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.