Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Total No. of Questions : 4] SEAT No.

8
23
P-5394 [Total No. of Pages : 2

ic-
[6186]-520

tat
8s
S.E. (Artificial Intelligence & Data Science/Computer

6:0
Engineering) (Insem.)

02 91
0:4
FUNDAMENTALS OF DATA STRUCTURES

0
31
0/1 13
(2019 Pattern) (Semester - III) (210242)
0

om
0/2
.23 GP

Time : 1 Hour] [Max. Marks : 30


Instructions to the candidates:
E
81

rsic-238
.c
C

1) Attempt questions Q1 or Q2, Q3 or Q4.


2) Draw neat & labelled diagrams wherever necessary.
16

tat
3) Assume suitable data if necessary.
8.2

es
:08
4) Figures to the right indicate full marks.
.24

:46p
02P 91
49

0a
Q1) a) What is time complexity? Why asymptotic notations are important? Find
0

time complexity of following code using step count method. [6]


31
0/1 n13

int x = 0;
P0
0/2

for (i = 0; i <N; i++)


8 1 io
.23 tG

{
sCE

38
for (j = N; j > i; j--)
ue

c-2
{
i
16

tat
x = x + i + j;
Q
8.2

8s

}
.24

6:0
PU

}
91
49

0:4

b) Write pseudocode to find factorial of a number. Draw the flowchart for


30
31

the same. [5]


SP

01
02

c) Explain what is Linear and non-linear data structure with example. [4]
0/2
GP

OR
0/1

Q2) a) Write short note on : [6]


CE
81

ADT
.23

Divide and conquer method.


16

b) What is meant by time and space complexity? Explain the asymptotic


8.2

notations used for time complexity? [5]


.24
49

P.T.O.
c) Explain what is static and dynamic data structure with example. [4]

8
23
Q3) a) What is Row Major and Column Major Representation? Explain with

ic-
example. Write the formula to find any element A[i][j] in row major and

tat
column major representations of A. [6]

8s
b) What is meant by sparse Matrix? Write an algorithm to perform addition

6:0
02 91
of two sparse matrices. [5]

0:4
0
c) Explain with example how single variable polynomial can be represented

31
0/1 13
using 1-D array? What is advantage and disadvantage of this
0
representation? [4]

om
0/2
.23 GP

OR
E
81

rsic-238
.c
Q4) a) What is the difference between simple and fast transpose of sparse matrix?
C

Write an algorithm to find simple transpose of sparse matrix. [6]


16

tat
b) Write an algorithm to find addition of two single variable polynomials
8.2

es
using array. Polynomial term consists of coefficient and exponent and

:08
.24

:46p
both are stored as an element in array. Assume terms are arranged in
02P 91
49

0a
descending order of exponent. State time complexity of the same. [5]
0
31
0/1 n13

c) Draw and explain following terms : [4]


P0

2D Array
0/2
8 1 io
.23 tG

3D Array
CE
s

38
ue

c-2
 i
16

tat
Q
8.2

8s
.24

6:0
PU

91
49

0:4
30
31
SP

01
02
0/2
GP
0/1
CE
81
.23
16
8.2
.24
49

[6186]-520 2

You might also like