Search
⌘K

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

LinkedIn

LinkedIn

Google

Google


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Early March, 2026

Intuit

Staff

Late October, 2025

Intuit

Senior

Early August, 2025

LinkedIn

LinkedIn

Mid-level

Your account is free and you can post anonymously if you choose.