0% found this document useful (0 votes)
2 views3 pages

Dsa Assignment 2 2024

This document is an assignment for a Data Structure and Algorithm course, focusing on various tree concepts including binary trees, threaded binary trees, and Huffman coding. It includes tasks such as defining tree terminologies, explaining binary tree types, constructing binary search trees, and performing tree traversals. The assignment is prepared by Prof. Gharu Anand and is intended for SE Computer students at the Mumbai Education Trust's Institute of Engineering, Nashik.

Uploaded by

parathasingh597
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)
2 views3 pages

Dsa Assignment 2 2024

This document is an assignment for a Data Structure and Algorithm course, focusing on various tree concepts including binary trees, threaded binary trees, and Huffman coding. It includes tasks such as defining tree terminologies, explaining binary tree types, constructing binary search trees, and performing tree traversals. The assignment is prepared by Prof. Gharu Anand and is intended for SE Computer students at the Mumbai Education Trust's Institute of Engineering, Nashik.

Uploaded by

parathasingh597
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/ 3

SE COMPUTER (2019 PATTERN) DATA STRUCTURE AND ALGORITHM

Mumbai Education Trust’s


INSTITUTE OF ENGINEERING, NASHIK.
COMPUTER ENGINEERING DEPARTMENT
Subject : DSA ASSIGNMENT NO – 02 Unit - II

1. Define Basic Terminologies of Trees with example.

2. Explain the Binary tree with its Types(examples).

3. Explain Representation of binary tree using sequential and linked organization.

4. Write a non-recursive function to display data in Binary Search Tree in descending

5. Write an algorithm to delete a node from Threaded binary Search Tree.

6. Explain Tree Traversal with it recursive algorithms and example.

7. With suitable example , Explain step for conversion of a general tree into binary tree.

Note : Consider root as A

8. Explain the Binary Search Tree in details with following example.

Contruct Binary Search Tree(BST) for the following :

a) J, R, D, G, T, E, M, H, P, A, F, Q

b) MAR, MAY, NOV. AUG, APR, JAN, DEC, JUL, FEB, JUN, OCT, SEPT

Prepared BY : Prof. Gharu Anand


SE COMPUTER (2019 PATTERN) DATA STRUCTURE AND ALGORITHM

9. The following numbers are inserted into an empty binary search tree in the given
order : G, C, B, A , D, E, F, I, H. Construct tree step by step. Represent the constructed
tree using static memory allocation.

10. Explain Threaded Binary Tree with its advantages and disadvantages.

11. Write a short notes on Huffman Coding.


Construct Huffman's Tree and the prefix free code for all characters :

12. Let characters a, b, c, d, e, f has probabilities 0.07, 0.09, 0.12, 0.22, 0.23, 0.27
respectively. Find an optimal Huffman code and draw Huffman tree.

13.
a) From the given traversals construct the binary tree :
Inorder : EICFJBGDKHL postorder : IEJFCGKLHDB
Draw the binary tree and write preorder traversal.

b) From the given traversals construct the binary tree.


Pre-order : G, B, Q, A, C, K, F, P, D, E, R, H
In-order : Q, B, K, C, F, A, G, P, E, D, H, R

c)
Generate binary tree for the following pre-order and in-order traversals :
Pre-order : E A C K F H D B G
In-order : F A E K C D H G B

d)

Prepared BY : Prof. Gharu Anand


SE COMPUTER (2019 PATTERN) DATA STRUCTURE AND ALGORITHM

14. Construct threaded binary tree step by step if the preorder traversal is G, B, D, C, A,
K, Q, P, R & in-order traversal is B, A, C, D, G, K, P, Q, R. Delete G and redraw a tree.

15. Solve following Tree traversal examples. Perform inorder , preorder and postorder
traversal of binary tree.
1. 2.

3. 4.

****************** Best of Luck *******************

Prepared BY : Prof. Gharu Anand

You might also like