Application of a Stack - Maze Traversal
Maze - Structure of partially connected cells with Start cell and End cell
connected by at least one path. Each cell has k neighboring cells.
2. Choose neighboring cell to enter.
3. Enter neighboring cell.
4. Continue to enter neighboring cells until a cell with no exits is
encountered or until the End cell is encountered.
5. If a cell with no exits is encountered, go back one cell and
take a different exit until either all exits have been taken
and the End cell not reached or the End cell is reached.
6. Repeat 5 until either you have returned to the Start cell and
exhausted all exits or you have reached the End cell.
Stack automates path reversal.