CS2003 DS Lab-9 Binary Search Tree
CS2003 DS Lab-9 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.