Maze solver, revershPolish, and tree traversal