What is state in backtracking?

Updated Apr 28, 2026

Short answer

Current partial solution.

Deep explanation

State represents the current configuration or path being explored in recursion.

Real-world example

Current path in maze.

Common mistakes

  • Mutating state incorrectly.

Follow-up questions

  • Why track state?
  • How manage?

More Backtracking interview questions

View all →