Search
⌘K

Leetcode 980. Unique Paths III

Count the number of 4-directional paths from the unique start to the unique end that visit every non-obstacle cell exactly once on an m×n grid with obstacles. This is essentially counting Hamiltonian paths on the grid (m*n ≤ 20), typically solved with DFS/backtracking and state pruning.


Question Timeline

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

Comments

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