Explain why function preorder2 from Section 5.2 makes half as many recursive calls as function preorder. Explain why it makes twice as many accesses to left and right children.
(a) Modify the preorder traversal of Section 5.2 to perform an inorder traversal of a binary tree.
(b) Modify the preorder traversal of Section 5.2 to perform a postorder traversal of a binary tree.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here