Professional Documents
Culture Documents
DS MidTerm 2021 (IT - 3I789 Lab Group 7)
DS MidTerm 2021 (IT - 3I789 Lab Group 7)
DS MidTerm 2021
Hi, Sourabh. When you submit this form, the owner will see your name and email address.
<89, 19, 50, 17, 12, 15, 2, 5, 7, 11, 6, 9, 100>
(A) 4
(B) 5
(C) 2
(D) 3
If the MAX_SIZE is the size of the array used in the implementation of circular
queue. How is rear manipulated while inserting an element in the queue?
(1 Point)
A. rear=(rear%1)+MAX_SIZE
B. rear=rear%(MAX_SIZE+1)
C. rear=(rear+1)%MAX_SIZE
D. rear=rear+(1%MAX_SIZE)
A) Infix Expression
B) Prefix Expression
C) Postfix Expression
(1 Point)
a) O(n)
b) O(nlogn)
c) O(1)
d) O(n2)
Let the following circular queue can accommodate maximum six elements
with the following data.What will happen after ADD O operation takes place?
front = 2 rear = 4
c) Tri-diagonal matrix
(1 Point)
b) Time complexity of inserting a new node at the head of the list is O(1)
d) We can traverse the whole circular linked list by starting from any point
Each node of a tree stores a data value and has zero or more pointers
pointing to the other nodes of the tree, which are also known as its__________.
(1 Point)
A. Child nodes
B. Leaf nodes
C. Root
10
11
(1 Point)
a) 1
b) 40
c) 74
d) -18
12
(A) 25,12,16,13,10,8,14
(B) 25,14,13,16,10,8,12
(C) 25,14,16,13,10,8,12
(D) 25,14,12,13,10,8,16
13
Which one of the following is not the application of the stack data structure?
(1 Point)
A. String reversal
B. Recursion
C. Backtracking
14
(1 Point)
15
16
17
a.Left
b.Right
18
The nodes belonging to the same parent node are known as_______.
(1 Point)
a. Sibling nodes
b. Parent nodes
c. Child nodes
19
a) homogeneous
b) heterogeneous
c) Sorted
20
A) Linear queue
B) Circular Queue
C) Stack
D) Dequeue
21
Consider a max heap, represented by the array: 40, 30, 20, 10, 15, 16, 17, 8, 4.
Now consider that a value 35 is inserted into this heap. After insertion, the
new heap is
(1 Point)
22
In a full binary tree if there are L leaves, then total number of nodes N are?
(1 Point)
a) N = 2*L
b) N = L + 1
c) N = L – 1
d) N = 2*L – 1
23
Which type of tree traversal in the binary search tree will give us a sorted
list?
(1 Point)
24
a) Array
b) Linked List
c) ADT
d) BST
25
In case of insertion into a linked queue, a node borrowed from the __________
list is inserted in the queue.
(1 Point)
A. AVAIL
B. FRONT
C. REAR
26
27
a) 1122
b) 1120
c) 1102
d) 1022
28
Evaluate and write the result for the following postfix expression
abc*+de*f+g*+ where a=1, b=2,
A. 61
B. 59
C. 60
D. 55
29
(1 Point)
30
In linked representation of stack the null pointer of the last node in the list
signals ……….
(1 Point)
31
Any node in the path from the root to the node is called
(1 Point)
A) Successor node
B) Ancestor node
C) Internal node
32
a. Info part
d. One pointer
33
Assuming that the height of a tree with a single node is zero, then what will
be the height of any AVL tree having 14 nodes?
(1 Point)
(A) 2
(B) 3
(C) 4
(D) 5
34
a) Splitting
b) Searching
c) Merging
35
Calculate the balance factor and decide whether the given tree is balanced
or not.
(1 Point)
a. Yes
b. No
c. Can’t say
d. May be
36
The seven element A,B,C,D, E, F and G are pushed onto a stack in reverse
order, i.e., starting from G. The stack is popped five times and each element
is inserted into a queue. Two elements are deleted from the queue and
pushed back onto the stack. Now, one element is popped from the stack.
The popped item is __________.
(1 Point)
1) A
2) B
3) F
4) G
37
A) X
B) X+S
C) S
D) XS
38
a) 11,16, 1408
b) 5, 12, 60
c) 5,21, 105
d) 5, 13, 65
39
a) 11,16, 1408
b) 5, 12, 60
c) 5,21, 105
d) 5, 13, 65
40
a. Internal nodes
b. root
c. leaves
file:///C:/Users/soura/Desktop/(1) Assignments _ Microsoft Teams_files/AssignmentsResponsePage.html 15/18
11/26/21, 11:26 AM DS MidTerm 2021 (IT - 3I789 Lab Group 7)
41
a) Abstract Level
42
50 40 60 30 45 55 10
a. 50 40 60 30 10 45
b. 40 30 50 10 45 60
c. 30 40 50 10 45 60
d. 40 30 50 60 10 45
43
(1 Point)
44
insertion sort
selection sort
bubble sort
merge sort
45
B) AB + CD* E – F **G /
C) AB + CD* E – *F *G /
D) AB + CDE * – * F *G /
Submit
This content is created by the owner of the form. The data you submit will be sent to the form owner. Microsoft is
not responsible for the privacy or security practices of its customers, including those of this form owner. Never give
out your password.