Create a binary search tree from an


Create a binary search tree from an array of the following names: Daniel, George, Adam, Peter, Michael, Jones, Tom, Allison, James, and Brian. Perform a preorder, inorder and postorder traversal on the binary tree and print the names in the order of the traversal. Remove Peter and Brian from the tree and perform the traversal again. What do you observe when an inorder traversal is performed on the binary tree?

Solution Preview :

Prepared by a verified Expert
Data Structure & Algorithms: Create a binary search tree from an
Reference No:- TGS01149116

Now Priced at $40 (50% Discount)

Recommended (94%)

Rated (4.6/5)

A

Anonymous user

5/25/2016 3:53:16 AM

Prepare a binary search tree from the array of the given names: Daniel, Adam, George, Peter, Michael, Jones, Tom, Allison, James and Brian. Carry out a preorder, in-order and post-order traversal on the binary tree and print the names in order of the traversal. Eliminate Peter and Brian from the tree and carry out the traversal again. Illustrate what do you observe whenever an in-order traversal is carried out on the binary tree?