(a) Modify the preorder traversal of Section 5.2 to perform an inorder traversal of a binary tree....
Question:
(a) Modify the preorder traversal of Section 5.2 to perform an inorder traversal of a binary tree.
Section 5.2
The preorder enumeration for the tree of Figure 5.1 is ABDCEGFHI: The first node printed is the root. Then all nodes of the left subtree are printed (in preorder) before any node of the right subtree.
(b) Modify the preorder traversal of Section 5.2 to perform a postorder traversal of a binary tree.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Practical Introduction To Data Structures And Algorithm Analysis Java Edition
ISBN: 9780136609117
1st Edition
Authors: Clifford A. Shaffer
Question Posted: