Wednesday, August 14, 2024

DS ASSIGNMENT 2 & 1


 DS ASSIGNMENT -2

DATE OF SUBMISSION: 02-11-24

1. Define AVL tree? Convert the following diagrams into Balanced AVL trees


2. What are types of rotations performed while inserting an element into an AVL tree?

3.Construct a B-Tree of order 5 with the following elements. 52, 85, 94, 65, 74, 84, 37, 15, 19, 21, 62, 77, 99, 101, 137

4.How to perform insertion and deletion in Priority Queue? Explain with suitable examples.

5.Write the implementation of search operation in red black trees..









 DS ASSIGNMENT -1

DATE OF SUBMISSION: 28-08-2024


  1. A)What are the postfix and prefix forms of the given below expression? A+B*(CD)/(P-R)? B) Convert the infix (a+b)*(c+d)/f  into postfix & prefix expression

  2. Explain the insertion operation in linked list. How nodes are inserted after a specified node? Define ADT and Mention the features of ADT.
  3. Give the trace of searching for 5 in the list of elements: 2, 5, 8, 10, 11, 15, 32, 64,78, 89 using binary search. Write the algorithm?
  4. What is Hash function? What are its types? How can we handle the collision using separate chaining and analyze its performance?
  5. A)Explain the operations of binary search tree with an example.
B) Construct a binary tree for the following sequence of numbers 45, 32, 90, 34, 68, 72, 15, 24 Traverse the binary tree created in order.

No comments:

Post a Comment

COMPARISON TREE

  Difference between Full and Complete Binary Tree A   binary tree  is a type of data structure where each node can only have  two offspring...