juniorBacktracking
What is base case in backtracking?
Updated Apr 28, 2026
Short answer
Condition to stop recursion.
Deep explanation
Base case defines when a valid solution is found or when recursion should stop.
Real-world example
Stopping when solution is complete.
Common mistakes
- Missing or incorrect base case.
Follow-up questions
- Why needed?
- When triggered?