Skip to content

path [terminology]

Terminology

Usage

  • Use for the mutable sequence of choices made along the current backtracking branch.
  • It differs from res, which stores completed solutions.
  • Restore path after recursive exploration.
path.append(ch)
dfs(i + 1)
path.pop()