Description
Modify the BST program that is discussed in the class by adding the
following
functions :
1. Write a function that builds a binary search tree by inserting
the following nodes into the tree. ( 70 50 100 30 60 80 110 20
68 90 120 25 62 ). The function must display the binary search
tree.
2. Write a function that traverse and displays the tree in pre-order
form.
3. Write a function that traverse and displays the tree in post –
order form.
4. Write a function that displays all the
tree. right sub roots of that
5. Write a function that displays all the
tree. left
sub roots of that
6. Write a function that counts and displays the number of leafs in
the tree.
7. Write a function that displays only the
leafs of the tree.
Note :
•
You have to use
( items
only
arrays when implementing this program
1- 7 where applicable
). Cannot use vector arrays ,
or linked
lists.
•
Cannot use library functions such as swap, sort , vector … etc. for this
programming assignment.
•
In the sample output , Replace My name (Husain Gholoom) with your first
and last name.