0% found this document useful (0 votes)
10 views1 page

Tut 4 Dsa

Uploaded by

Kamna Choudhary
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)
10 views1 page

Tut 4 Dsa

Uploaded by

Kamna Choudhary
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

B.Tech.

(Computer Science and Engineering)


Semester: III
Subject: DSA (BCO002B)
Marks : 64 Marks

Tutorial Sheet 4
SECTION A (5*2=10)
1. Define a complete binary tree.
2. What is the difference among three types of traversals in a tree?
3. What is the key rule of BST?
4. Why do we call AVL tree a self-balancing tree?
5. How are binary trees represented in memory?

SECTION B (3*7=21)
1. Construct an AVL tree using following sequence: 21,26,9,4,14, 28, 18, 15, 10, 2, 3, 7.
2. Consider the following tree:

a. Which type of binary tree it is?


b. How many levels are there in this tree?
c. What is the height of the tree?
d. Name the root of the tree.
e. Write all the siblings in this tree.
f. Name all the internal and external nodes of this tree.
g. Write the post-order traversal of this tree
3. Discuss all the cases of BST deletion with example.

SECTION C (3*11=33)
1. Given a BST in pre-order as {13,5,3,2,11,7,19,23}{13,5,3,2,11,7,19,23}, draw this BST
and determine if this BST is the same as one described in post-order
as {2,3,5,7,11,23,19,13}{2,3,5,7,11,23,19,13}.
2. Draw a binary tree using following traversal sequence:
In-order: D, B, E, A, F, C, G
Post-order: D, E, B, F, G, C, A
Find its preorder traversal sequence.
3. The preorder traversal sequence of a binary search tree is-
30, 20, 10, 15, 25, 23, 39, 35, 42
Which one of the following is the post-order traversal sequence of the same tree?
1. 10 , 20 , 15 , 23 , 25 , 35 , 42 , 39 , 30
2. 15 , 10 , 25 , 23 , 20 , 42 , 35 , 39 , 30
3. 15 , 20 , 10 , 23 , 25 , 42 , 35 , 39 , 30
4. 15 , 10 , 23 , 25 , 20 , 35 , 42 , 39 , 30

You might also like