0% found this document useful (0 votes)
57 views1 page

CS2003 DS Lab-9 Binary Search Tree

This document outlines a lab assignment for a data structures and algorithms course. The lab involves implementing a binary search tree and performing operations like insertion, searching, computing height, finding successors/predecessors, and deletion using recursive functions. Students are asked to insert specific keys, print the keys in sorted order, search for a key, compute height, find successors/predecessors, and delete keys while printing the tree after each deletion.

Uploaded by

bhumika.verma00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views1 page

CS2003 DS Lab-9 Binary Search Tree

This document outlines a lab assignment for a data structures and algorithms course. The lab involves implementing a binary search tree and performing operations like insertion, searching, computing height, finding successors/predecessors, and deletion using recursive functions. Students are asked to insert specific keys, print the keys in sorted order, search for a key, compute height, find successors/predecessors, and delete keys while printing the tree after each deletion.

Uploaded by

bhumika.verma00
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

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.

You might also like