CS2003 Data Structures and Algorithms Lab
Lab -8 Date 15/09/2020 Time : 8 to 9.40am
Faculty Incharge : Dr. R. Jothi and Dr. V.M. Nisha
Binary Search Tree
Q1. Implement Binary search Tree (BST) and perform the following operations
a. Insert the keys 11,66, 6,9,40,28,5, 88,125,90
b. Print the keys in sorted order using suitable traversal method.
c. Search for a key x and prints its address if it is present.
d. Compute height of the BST
e. Print successor/predecessor of a given key x
f. Delete the keys 40 and 88 one by one and print the tree in level order after each delete.
Note: use only recursive functions for all the operations.