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

Assignment No 4 DS July24

Dsgt modul 4 assignment questions

Uploaded by

swatimulik83
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)
28 views3 pages

Assignment No 4 DS July24

Dsgt modul 4 assignment questions

Uploaded by

swatimulik83
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

Mahatma Gandhi Mission’s College of Engineering and Technology

Kamothe, Navi Mumbai


Assignment -IV
Subject-DS Div-A and B Sem-III Class –SE
Date of Issue: 24.0924 Date of Submission: 08.10.24
Q.No Question Module

Q1.select correct answer


1) The post order traversal of binary tree is DEBFCA. Find out the pre order traversal. 4
A. ABFCDE B. ADBFEC
C. ABDECF D. ABDCEF
2) The in-order traversal of tree will yield a sorted listing of elements of tree in........ 4
A. binary trees B. binary search trees
C. Heaps D. binary heaps
3) In a binary tree, certain null entries are replaced by special pointers which point to 4
nodes higher in the tree for efficiency. These special pointers are called.........
A. Leaf B. Branch
C. Path D. Thread
4) The in order traversal of tree will yield a sorted listing of elements of tree in.... 4
A. Binary trees B. Binary search trees
C. Merging D. AVL Trees
5) For the tree below, write the pre-order traversal. 4

a) 2, 7, 2, 6, 5, 11, 5, 9, 4 b) 2, 7, 5, 2, 6, 9, 5, 11, 4
c) 2, 5, 11, 6, 7, 4, 9, 5, 2 d) 2, 7, 5, 6, 11, 2, 5, 4, 9
Q2. Choose Correct Options
1) For the tree below, write the post-order traversal. 4
a) 2, 7, 2, 6, 5, 11, 5, 9, 4 b) 2, 7, 5, 2, 6, 9, 5, 11, 4
c) 2, 5, 11, 6, 7, 4, 9, 5, 2 d) 2, 7, 5, 6, 11, 2, 5, 4, 9
2) Which of the following is the most widely used external memory data structure? 4
a) AVL tree b) B-tree
c) Red-black tree d) Both AVL tree and Red-black tree
3) A B-tree of order 4 and of height 3 will have a maximum of _______ keys. 4
a) 255 b) 63
c) 127 d) 188
4) The leaves of an expression tree always contain? 4
a) operators b) operands
c) null d) expression
5) An expression tree is created using? 4
a) postfix expression b) prefix expression
c) infix expression d) paranthesized expression
6) For the tree below, write the in-order traversal. 4

a) 6, 2, 5, 7, 11, 2, 5, 9, 4 b) 6, 5, 2, 11, 7, 4, 9, 5, 2
c) 2, 7, 2, 6, 5, 11, 5, 9, 4 d) 2, 7, 6, 5, 11, 2, 9, 5, 4

7) For the tree below, write the level-order traversal. 4


a) 2, 7, 2, 6, 5, 11, 5, 9, 4 b) 2, 7, 5, 2, 11, 9, 6, 5, 4
c) 2, 5, 11, 6, 7, 4, 9, 5, 2 d) 2, 7, 5, 6, 11, 2, 5, 4, 9
8) Which of the following algorithms is the best approach for solving Huffman codes? 4
a) exhaustive search b) greedy algorithm
c) brute force algorithm d) divide and conquer algorithm
9) What is the traversal strategy used in the binary tree? 4
a) depth-first traversal b) breadth-first traversal
c) random traversal d) Priority traversal
10) How many common operations are performed in a binary tree? 4
a) 1 b) 2
c) 3 d) 4
Q3. Answer the following questions in brief
1) What is Huffman coding? Construct the Huffman Tree and determine the code for 4
each symbol in the sentence "ENGINEERING".
2) Contruct a binary tree from preorder and inorder tree traversal given below. 4

Preorder: 1, 2, 4, 8, 9, 10, 11, 5, 3, 6, 7


Inorder: 8, 4, 10, 9, 11, 2, 5, 1, 6, 3, 7
3) Enlist and explain different types of trees in data structure. 4
4) What is Binary Search Tree? Construct Binary Search Tree by inserting the following 4
numbers from left to right.
11, 6, 8, 19, 4, 10, 5, 17, 43, 49, 31
5) Explain Expression Tree and construct Binary Expression Tree for the following infix 4
expression.
a*b/c+e/f*g+k-x*y
6) Enlist and explain different types of binary tree in data structure. 4
7) What are the different operations that we can perform on binary search tree (BST)? 4
Explain in details.
8) Define height of a tree, level of a tree and depth of a tree with example. 3

You might also like