Summary
Stacks have many applications.
The application which we have shown is called backtracking.
The key to backtracking: Each choice is recorded in a stack.
When you run out of choices for the current decision, you pop the stack, and continue trying different choices for the previous decision.