How would you traverse through a binary search tree and print out each element in order?
Sigiloso
If by in order you mean InOrder traversal: - You could traverse the tree very easily using recursion. - If you're not explicitly allowed to use recursion. You could use a Stack to simulate recursion - If you're not allowed to use a Stack to simulate recursion, you could walk through the tree and "rebuild" it so that it becomes a "vine" (almost a linked list) with the nodes reordered for inorder traversal and then walk through it.