Problem
Design algorithms for the following operations for a binary tree T:
• preorder Next(v): return the node visited after node v in a preorder traversal of T
• in order Next(v): return the node visited after node v in an in order traversal of T
• post order Next(v): return the node visited after node v in a post order traversal of T. What are the worst-case running times of your algorithms?