0% found this document useful (0 votes)
17 views6 pages

DS 2021 QB

This document contains an examination paper for Data Structures from the College of Engineering, VTU Belagavi. It includes questions from various topics such as binary trees, recursion, and graph representations, divided into two parts: Part A with multiple-choice questions and Part B requiring detailed answers. The exam is designed for third-semester B.E. students and has a total duration of 3 hours with a maximum score of 100 marks.

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)
17 views6 pages

DS 2021 QB

This document contains an examination paper for Data Structures from the College of Engineering, VTU Belagavi. It includes questions from various topics such as binary trees, recursion, and graph representations, divided into two parts: Part A with multiple-choice questions and Part B requiring detailed answers. The exam is designed for third-semester B.E. students and has a total duration of 3 hours with a maximum score of 100 marks.

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/ 6

MM CoUEGE OF

ENGINCERING
Once 100

An Autonomous Institution
QPP29
VTU Belagavi,
AMllatedto Approved by AICTE, Accredited by
ThirdSemester B.E. NAAC,NBA Recognlzed by
Degree (Autonomous) UGC with 12(0 612(®)
Status
Examinations, March-2021
MVJ191S32
Data Structures
Information Science and Engineering
Duration:
3 Hrs.
Maximum Marks: 100
Noe Answer all Questions in Part-A.
AnsweranyFive fll
guestions in Part Bchoosing one full
Missing dataif any, may be suitably assumed. question from each module.
QNO. Marks
PART-A
data Structures allows
Which
insertingat rear?
deleting the data elements from front and 01
a)Stack b) Queues
c) Deques d)
To represent the hierarchical relationship Binary Search Tree
between the elements,which
2 structure issuitable? data 01

a) Trees b)Graphs
c) Priority Queues d)B-Tree
The post order Traversal of the binary tree is
traversal.
DEBFCA, find out the preorder 01

a)ABFCDE b) ABDFEC
c) ABDECF d) ABDCEF
An Algorithm that calls itself directly or indirectly is known as
01
a) Sub Algorithm b)Recursion
c) Traversal Algorithm d) Polish Notation
How can we describe an array in the best possible wav? 01
a) The Array shows a hierarchical b) Arrays are immutable.
structure
b) Container that stores the d) he Array is not a data
elements of similar types structure
6 If the size of the stack is 10 and we try
to add the 11th element in the stack 01
then the condition is known as
a) Underflow
c) Overflow b) Garbage collection
7 d) None of the above
Which of the following is the prefix form of
a) A+(BC*) A+B*C? 01
d) ABC+* b) +AB*C
d) +A*BC

1\6P ages
17 16 15 14 13 12 11 10 9
2|6
(N/2)-1
-1)/2 c) a)Linked
The LisStack
tc) a)used? In c) a)The Underflow
c)1 Houseful
a)2Each c)additional c)
a)Thefactorfactor For
is(node*)malloc(sizeof(rnode*)
treea) which c) Which ptr=a) Consider c)1 a)5the Starts c)
In MAX-1
AB+ ptr=(node*}malloc(sizeof(node)) rear=a) Which
number Breadth AB the childrenEvery nodeEvery a) c)Which
an a
front=(rear+1) mplemented
+postfix node situation same {
array
CD* CD*E indicates AVL of one nodeptr: struct
node th
wicircular one
node binary the struct
*next;
node data;int the index
First E- form in or of O
of - singly when tree where
omparisons FG if has following the following at queue using theof
Search *F/** of not, if tree mod
*G/ the linked in the at following which
a which most has lowing
front max folarray
linked difference at code implement
ofexpression list statements the aandtion
Graph, has of two least is having
done list the the insertion is
rear
......START=NULL one size the
by (A+ two in about correct values
which fields. height
sequential B)*(C*D- subtrees is of overfl
MAX? ow
(N+1)/2
+2)/2 b) Queue
d) Hashing d) b) d) b) b)
3 Overflow
d)4 Saturated balance
unitfactor
d) b) factor d) b) d) b)
d) b)ptr=(node)nalloc(sizeof(node)) d)2 b)0
the
using rear=MAX
d) b)
tparent
he one
root a option are None
ofABAB between Every node
oneEverybinaryNone
the + + is additional next array3
CD*
CDE E)*F/G .. has of to and of condition
search non-root
non-empty tree element
following height the create 4 of the
* E- the
- is
above respectively. sIzeabove
is *F F is? leftpiece not if
**G/ one node a wil a
and new 5,
data *G/ tree
correct? the
unit of take circular
right
information
has has node?
structure larger. place. array
Detemina
exactly exactly queue
subtree
indey
b is
01 01 01 01 01 01
2 ONo. 20
1
a a)
) a) ever
1y
c3 preorder(tree->left):
Aprintf("%d".
>lcd
eft): The 8,c)
5 a)
7,6 10, the
2,86,94
10,12,20,
For Consider Highest
Salary.
getting Wnte
KeadEName, structures. Also What preorder(tree->right):
bitnraree->i
y nfol: State nent
StatemSt
3eantement
2 preorder(node
1 void
Jnode;st
*ni
ruct
ght
str;ul
ct
eft:t(
yintfo ;
pedef
st ruct
tree
Cons
preorder ider the What
the alpreordernode(tree->right):prpreiorntf(d" er above 73, number
data
ove data aexplain is 50, are
the istree is
Empl not is Statements inserted
16, the
for Program %d, following
D, CList Data
Sorted 10 61
rray Structures?
out the balanced
more
employees DOJ tree->info): *tree) in
array. tothe basic than should segment
codein the
12 of
define
(Date, if nodes
applications. andthe of following
operationsClassify er(tree- be
and andMonth,details Module-1 PART-B difference of
OR left
display and order:\rin
-86. preorder(tree->left):
d)4 b)2 preorder(tree
tree->info):
printf("%d,
>right); d) b)
tree->info):
printf("%d,
>right): 5,8 d)6,7b) and
at
Year) theof thExplain preorder(tree->left):
between toC right
them. traverse
can 45,
and
Employee sub-tree
Apply them 15,
FindSalary be left a
binary 8,
linear the briefly.
performed 5
6, of
the
5,
Employee(Basic, with right tree
search the preorder(tree- 65,binary
subtree using 47,.
DA fields on 12. tree
algorithm who HRA) the
data 18. if
is like
Marks 01 01 01
8 8
ges 6 4 3

b) a) C) b) a) c) b a) b) a) b)
resentation.stored
give in function
+ What Explain
Write How Write with Write array,
program WhatDefine e
thWrite Write <40’ Grade
40-49-’
Grade
Consider
3x^2 (ii)
Write ABCD+*F/DE*++
a=3,b=2,c=6,d=4,f=5 algorithm 50-59->
FGrade
E70-79-’
80-89->A
DGradeGrB
ade marks Write and
(ii) () DeleteInsert (i) (a+b)*d+e/(f+a*d)+c
(i) ((a/(b-c+d))*(e-a)*c) (ii) (i) cases
60-69-’CGrade90-100>SGrade
is a an Deletinga Inserting the Display Provide is the a traace
C Queues c an using C
+1, two to program a Ordinary function C following to the for
a count Linked postfix it.
single show examples
suitable stimulate
advantage
program algorithm using program Write
polynomials the overflow array
a Write
iagrammatically node ITEM following form
1-D
the list? for
Queue for algorithm the andusing its
the
dernonstrating of and to best
array,
number List the with as
a theQINSERTof display
concatenation first the following
evaluate array case
A(x)implementation
the can the Module-3 operations circular working underflow
Add for and following OR Module-2 the toand
= of OR be given Node
different
3x^3+4x^2
the elements represented Singly the
how of QDELETE
queue
of postix a folloCalwincgulaexpl
te ain
twO ITEM the
Linked circular expression various postfix
these types of
present of information
two list over it.
polynomials. +1 the for expression
stack
Average
grades
two and of doubly
using list queuelinear expression.
same Queues using
linked
in of
polynomialS operations
B(X) a Singlelinked of
queue 10
singly using stack as
Also, = list. integers Execute studente
x^4 your
linked Wnte linkedist list WiteArays
including
Calt 10X* + using a input vo
is a
itsC C

6 4 4 8 4 4 8
10
a)
Drawthe
the gener Binary
function for treetree for the Module-4
rated
b) Give each using In fol owing expression
in-order

JGDHEBKIFCA. Traversal order, pre order, and6+8*(9/5)7+2.


Construct BST sequence: BT DJGBHEAFKIC and
post order. Traverse Write the
8

45, forConst
theruct for
c)
100, 85, the same
55,
110, 20, el70,ement post-order sequence
Constuct
ste
65, 113, p-by
145, -step:
4

the Max OR 132, and 96.


a)
4
Heap and Min
100,85,45,55 110,20,70,65,113,145,132,96
Construct the AVL Heap for the
15. Tree
20, 24, 10, 13, 7, for the elerment step by step 4

Show the step by


What is the
30,
step
36. 25
process of
followi ng data 6

of threaded advantage of
binary tree forthreaded const ruct
binary in g the
balanced
10, 20, 30, tree? Explain the trees.
40,50,60 of order 2 Construction 6

a) What is graph? Give


matrix Module-5
and
Show adjacency matrix and adjacency
list for the
list
represerntation of graph.
3
below graph 5

2
6
8

b What are the mnethods Used for traversing a graph.


Explain any one with S
example and write function for same.
c) Apply Prim's algorithmn, determine minimum cost spanning tree for the 6
weighted graph shown below.
1

OR
10

c) b) a)
Sub-graph iv.
Multi-graph Graph
following:
i. Define
i. the definedApply Apply
self-edge
Graph
with

bys 6 the
C= warshall'
following
0 Topological
0
1
0 algorithm
0 1
adjacency
0 sorting
to
find 6 for
2
matrix.
the the
transitive following
Write

the
closure graph
algorithm

of
the
graph

You might also like