Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
3 views4 pages

Dsa Assignment 2 2024

The document outlines a syllabus for a Data Structure and Algorithm course, focusing on trees, including definitions, types, representations, and traversals. It includes practical tasks such as constructing binary search trees, implementing Huffman coding, and converting general trees to binary trees. Additionally, it covers threaded binary trees and their advantages, along with pseudocode for various tree traversal methods.

Uploaded by

bsjadhav.foe
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)
3 views4 pages

Dsa Assignment 2 2024

The document outlines a syllabus for a Data Structure and Algorithm course, focusing on trees, including definitions, types, representations, and traversals. It includes practical tasks such as constructing binary search trees, implementing Huffman coding, and converting general trees to binary trees. Additionally, it covers threaded binary trees and their advantages, along with pseudocode for various tree traversal methods.

Uploaded by

bsjadhav.foe
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/ 4

SE COMPUTER (2019 PATTERN) DATA STRUCTURE AND ALGORITHM

COMPUTER ENGINEERING DEPARTMENT


Subject : DSA

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. Jadhav B.S.
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 : FAEKCDHGB

d)

Prepared BY : Prof. Jadhav B.S.


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.

16. Explain how to convert general tree to binary tree with example.

17. Write a Non-recursive pseudocode for inorder traversal of binary tree.

18. Describe Binary Search tree deletion with example.

Prepared BY : Prof. Jadhav B.S.


SE COMPUTER (2019 PATTERN) DATA STRUCTURE AND ALGORITHM

19 Write a pseudo code for BFS tree traversal with example.

20. Construct Huffman’s tree. Determine code for following characters whose frequencies as

are given :

Character A B C D E

Frequencies 20 10 10 30 30

21 What is necessity of threaded binary tree? Explain advantages and disadvantages of TBT.

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

Prepared BY : Prof. Jadhav B.S.

You might also like