Skip to content

CSE21P6 - Data Structure Lab

Trees and Heaps

Term 161

Exp 6. Write a program to create a Binary Search Tree of \(n\) elements and then display the elements (preorder, inorder and postorder) of the tree.

Exp 10. Write a program to create a Maxheap of \(n\) elements and then display the elements of the heap.

Term 211

Exp 10. Design, Develop and Implement a menu driven Program in C for the following operations on Binary Search Tree (BST) of Integers.

  1. Create a BST of N Integers: 6, 9, 5, 2, 8, 15, 24, 14, 7, 8, 5, 2.
  2. Traverse the BST in Inorder, Preorder and Post Order.
  3. Search the BST for a given element (KEY) and report the appropriate message.
  4. Delete an element (ELEM) from BST.

Exp 12. Write a C program to perform the following operations.

  1. Insertion into an AVL-tree.
  2. Deletion from an AVL-tree.
  3. Search for a key element in an AVL tree.