New answers tagged

0

Short answer yes, you can achieve this in any type of tree, if there is a pointer from child to parent node. The purpose of the stack is to remember you have to go back and visit another branch. Without the stack, but with the ability to go back to parent nodes, you can check if there is another branch that you should have visited. Then the only space ...


Top 50 recent answers are included