0% found this document useful (0 votes)
195 views

Assignment 4 ( Tree) BCS301

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

Assignment 4 ( Tree) BCS301

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

G. L.

Bajaj Institute of Technology and Management, Greater Noida


Department of Computer Science & Engineering
Assignment-4 (Unit-4)
Subject: Data Structure Subject code: BCS-301
Faculty Name: Mr. Naveen Session: 2023-24 (ODD)

1. If the Inorder of a binary tree is B,I,D,A,C,G,E,H,F and its post order is I,D,B,G,C H,F,E,A then draw a
corresponding binary tree with neat and clear steps from above assumption.

2. Insert the following sequence of elements into an AVL tree, starting with empty tree
71,41,91,56,60,30,40,80,50,55 also find the minimum array size to represent this tree.

3. Write Short notes of following:


(a) Extended Binary Trees
(b) Complete Binary Tree
(c) Threaded Binary Tree.

4. What is the difference between a binary search tree (BST) and heap? For a given sequence of numbers,
construct a heap and a BST. 34, 23, 67, 45, 12, 54, 87, 43, 98, 75, 84, 93, 31

5. What is a B-Tree? Generate a B-Tree of order 4 with the alphabets (letters) arrive in the sequence as
follows:
AGFBKDHMJESIRXCLNTUP

6. Can you find a unique tree when any two traversals are given? Using the following traversals construct the
corresponding binary tree: INORDER: H K D B I L E A F C M J G PREORDER: A B D H K E I L C F G
J M.
Also find the Post Order traversal of obtained tree.

7. Consider the following AVL Tree and insert 2, 12, 7 and 10 as new node. Show proper rotation to maintain
the tree as AVL.

8. Define AVL Trees. Explain its rotation operations with examples. Construct an AVL Trees with the values
10 to 1 numbers into an initially empty binary tree.

9. Differentiate between fixed length and variable length encoding. Draw a Huffman tree for the following
symbols whose frequency of occurrence in a msg is stated along with the symbol below :
A : 15, B : 6, C : 7, D : 12, E : 25, F : 4, G : 6, H : 1, I : 15

You might also like