0% found this document useful (0 votes)
3 views

DS 2022 qb2

The document outlines the examination structure for the Third Semester B.E. Degree in Data Structures at MVJ College of Engineering, including details on the exam format and specific questions from various topics. It covers array initialization, linked lists, memory structures, tree types, and graph representations. The exam consists of multiple-choice questions in Part A and detailed questions in Part B, requiring students to demonstrate their understanding of data structures and algorithms.

Uploaded by

Shruthi Iyer
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)
3 views

DS 2022 qb2

The document outlines the examination structure for the Third Semester B.E. Degree in Data Structures at MVJ College of Engineering, including details on the exam format and specific questions from various topics. It covers array initialization, linked lists, memory structures, tree types, and graph representations. The exam consists of multiple-choice questions in Part A and detailed questions in Part B, requiring students to demonstrate their understanding of data structures and algorithms.

Uploaded by

Shruthi Iyer
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/ 5

MVJ

COLLEGE OF
USN
Thirdsemester B.E. Degree
ENGINEERING-BANGALORE
(Autonomous) Examinations, Mar/Apr-2022
Data Structure MVJ201S32/CD32
ration:3 Hrs.
Common to CD and ISE
Vote Maximum Marks :100
,Answer allQuestions in Part-A.
" Answer any five full questions in Part B
Choosing one full question from each module.
ONo.
Marks
PART-A
1 Howdo you initialize an array in C?
a) int ar|3] = (1,2,3): b) int ar(3) = (1,2,3)}:
c) int arr[3] = {1.2,3); d) int ar(3) = (1,2,3): 1
What is the value of the postfix
a) 1
expression 63 24+- *?
b) 40
c) 74 d) -18 1

What is the functionality of the following piece of


public int function() code?

Node temp =tail.getPrevl):


tail.setPrev(tenp.getPrev):
ternp.getPrev).setNext(tail);
size--;
retum temp.getltem):
a) Retum the element at the tail b) Returm the element at the tail of the
of the list but do not renmove it list and remove it from the list
c) Retum the last but one d) Return the last but one element at
element from the list but do the tail of the list and remove it from
not remove it the list 1

What kind of linked list is best to answer questions like "What is the
item at
position n?"
a) Singly linked list b) Doubly linked list
c) Circular linked list d) Array implementation of linked list 1

Which of the following is the most widely used external memory data
structure?
a) AVL tree b) B-tree
c) Red-black tree d) Both AVL tree and Red-black tree

1|5P ages MVJ201S32


can build the tree
traversals on a binary tree
pair's
6 Which of the following
in-order
uniquely?
post-order and pre-order b) post-order and
a) order d) level order and preorder 1
post-order and level
c)
greatest key is always in which node)
element with the
7 In amax-heap, b) First node of left sub tree
a) Leaf node d) First node of right sub tree 1
C) root node
normal linked list?
differentiates a circular linked list from a
8 What
the 'next b) It is faster to traverse the circular
a) You cannot have linked list
pointer point to null in a
circular linked list
not have the d) Head node is knowm in circular
c) Youmay or may
a linked list
next pointer point to nulin 1
circular linked list

expression?
Which of the following is an infix b) ab+c*
a) (a+b)*(c+d) d) abc+* 1
c) +ab

following is done?
10 When an operand is read, which of the
a) It is placed on to the output
b) It is placed in operator stack 1
c) It is ignored d) Operator stack is emptied
increment the rear end of the queue?
11 In acircular queue, how do you
b) (rear+1) % CAPACITY
a) rear++
d) Rear- -
c) (rear % CAPACITY)+1 1

equivalent postfix expressions.


12 Convert the following infix expressions into its
(A + B AD)/(E - F)+G
a) (A BDA+EF-/G+) b) (A BD +A EF-/G+) 1
(ABDA+EF/- G+) d) (A BDEF+Al -G+)
c)

13 What is an AVL tree?


b) a tree which is unbalanced and is a
a a tree which is balanced and
is a height balanced tree height balanced tree 1
a tree with three children d a tree with atmost 3 children

14 Where is inear searching used?


a) When the list has only a few b) When performing a single search in
elements an unordered list
Used all the time d) When the list has only afew
elements and When performing a 1
single search in an unordered list

2| 5Pages
18 17 16 15
20 19
2. Q,No.
Which
a) c)
99 a)
25are In a)
3|5Pa c) a) c) a)7 The What
b) a) Connected
Tightly
Connected
Weakly c) a) Descendirng memory
more
36
a) graph A ful Consumes
memoryless is
10 binaryConsunmes
size are
elements
Wastage caStack
n be number the
g arrays.Define
on min-maxheap heapmax implemented
arraythstructures
rough an of leaf
primitiveExplain thSRol
em. INo,Writecarried lesser inodes
se having and the advantage
followng of search
Find a data
C
priority than
inserted of Queue elements
different SName, an memory in
operations program
the structures. edge the the tree
queue data of
in is in tree,every recursive
the
student DoB,
types to from allocated an if the
that can array the disadvantage how
internal
d
who andefne List each adjacency
can of be approach
data haCGPA.
s and many
be vertex implemented b) 49
d) 14
b) b)
101d) 49 d) b)
heap
tried)min b) d) node
highest Connected
Strongly
details explainModule-1 PART-BConnected
Looselyd) b) internal
structures
performed? OR Read Index of More Less
to Elerments negativecan be
sequentialy matrix has than
of the every the code code
CGPA, the of of an
using tharray?
e of nodesexactly
with data the different other can a and
has iterative
students first graph are two toeasy
for5 be
examples. vertex element there be
operations accessed having children. to
students is
writtenapproach?
weather in implement
called in 7 the If
What an vertices
and that tree?there
fields a array
are display can is
the like be
1 1 1
Marks 1 1
1
8 8
b) Give the alaorithm for Binary Search and apply the same to search th
key=92 in the array: 13, 17,23, 34,67, 76, 92, 99
Module-2

3 a) Define stack. Give the implementation of push, pop and display functione
Include check for empty and full conditions. 8
b) Outline the algorithm for infix to postfix. Using the same algorithm conven
the following infix expression to equivalent postfix expression: 8
(X+ ( Y + Z)*U)/) *W).
OR
4 a) Write an algorithm to evaluate a a postfix expression and apply the same
for the given postfix expression, 5 46+ *493+*
b) Write a C function Calnsert( ) and CODelete()operations on circular
queues.
Module-3

S a What is a linked list? Explain the different types of linked lists with neat
8
diagram.
b) Write and explain to implement the operations of stack using singly linked 8
list with the help of C statements.
OR

6 a) With the C statement explain how do you create a node, add and delete
on singly linked ist with proper message where each node is containing
8
the details of students in the formn of SRollNo, SName and CGPA as data
fields.
b) Write a Cfunction to inserta node at front and delete a node from rear
end in a circular linked list.
Module-4

7 a) What is a tree? With suitable example define:


i) Binary tree i) Level of binary tree
ii) complete binary tree iv) degree of a tree
the tree
b) Define expression tree. For a tree given in figure 7(b) traverse
algorithm for
using in-order preorder and post-order traversals. Write the
the same

Fig:7(b) iM VJ2 01S32


4|5Pages
What is an AVL
8 a
b) Construct a tree? Explain the OR
binary search treedifferent
preorder traversals types of rotations of an AVL tree.
by using
In-order: BCAEDGHEI the following in-order and
Preorder: ABCDEFGHI
9 a) Define
graph.example.
graph with Explain the Module-5
b) Define the adjacency matrix and list representation of a
()
Directedtermin ol
Acyclic
(i)Complete graph ogies
Graph with example for graph data structure.
4
c) Apply Prim's
weighted graphalgorithm, determine minimum cost Spanning tree for the
in figure 9c).

3
3 7

Fig.9(c)
OR
10 a) Write an
algorithm for BFS and DFS graph traversal
b) Apply topological methods.
sorting for the graph in figure 10(b).

Fig:10(b)

5|5Pages

You might also like