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

Dec 22

The document outlines an examination paper for Data Structures & Algorithms, with a duration of 3 hours and a maximum score of 80 marks. It includes instructions for answering questions, with Question 1 being compulsory and requiring students to attempt three out of five additional questions. Various topics covered include data structures, algorithms, graph traversal techniques, and programming tasks related to queues and binary trees.

Uploaded by

tuba.khan7575
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)
8 views

Dec 22

The document outlines an examination paper for Data Structures & Algorithms, with a duration of 3 hours and a maximum score of 80 marks. It includes instructions for answering questions, with Question 1 being compulsory and requiring students to attempt three out of five additional questions. Various topics covered include data structures, algorithms, graph traversal techniques, and programming tasks related to queues and binary trees.

Uploaded by

tuba.khan7575
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/ 2

1

E
0

AB
5

1E

D1

8C
C9
Paper / Subject Code: 51124 / Data Structures & Algorithm

25

EB
0E
12
4B

AB
95

1E

D1

8C
3

BC
CE

25

EB
0E
12
1E

95
34

1E

D1

8C
BC
CE
BE

25

0E
12
1E

95
34
D2

1E

D1
Duration: 3hrs [Max Marks:80]

BC
CE
BE
6F

25

0E
12
1E

95
AB

34
D2

1E

D1
BC
CE
BE
6F

25
EB

12
N.B. : (1) Question No 1 is Compulsory.

1E

95
AB

34
D2

1E
8C
(2) Attempt any three questions out of the remaining five.

BC
CE
BE
6F

25
EB
0E
(3) All questions carry equal marks.

1E

95
AB

34
D2
D1

8C

1
BC
CE
BE
6F
(4) Assume suitable data, if required, and state it clearly.

25
EB
0E
12

1E

95
AB

34
D2
1E

D1

8C

BC
CE
BE
6F
25

EB
0E
12

1E
AB
95

34
1 Attempt any FOUR [20]

D2
1E

D1

8C
BC

CE
BE
6F
25

EB
0E
12
a Explain linear and nonlinear data structures.

1E
AB
95

34
34

D2
1E

D1

8C
BC

CE
CE

BE
6F
25

EB
b Evaluate the given postfix expression using stack

0E
12

1E
E

AB
95
34

D2
1E

D1

8C
E1

2 3 4 +∗ 5 ∗
BC
CE

BE
6F
25

EB
0E
12
2B

AB
95
34

D2
1E

D1

8C
FD

c What are the advantages of a linked list over arrays?


E1

BC
CE

6F
25

EB
0E
12
2B
B6

1E

AB
95
34

d Explain different graph traversal techniques.

1E

D1

8C
FD
BA

BC
CE
BE

25

EB
0E
12
B6

e Given an array int a[]={69,78,63,98,67,70,52,55,96}. Calculate the address of


CE

95
34
D2

1E

D1

8C
E1
BA

BC
CE
E8

6F

25

0E
a[6] if the base address of an array is 2100.

12
2B
CE
10

1E

95
AB

34

1E

D1
FD
2D

BC
CE
E8

2 a Write a C program to implement queue using Arrays. [10]


BE

25
EB

12
B6
E1

10

1E

95
34
D2

1E
8C

b Given the postorder and inorder traversal of a binary tree, construct the original [10]
BA
2D
51

BC
CE
BE
6F

25
0E
52

E1

CE

1E

95
AB

34
D2

tree.
D1
C9

51

BC
CE
E8

BE
6F
EB
12
4B

52

Postorder: D E F B G L J K H C A
10

1E
AB

34
D2
1E

8C
C9
E3

2D

CE
BE
6F
25

EB
0E

Inorder: D B F E A G C L J H,K
EC

4B

E1

E
AB
95

D2
D1

8C
E3

E1
E1

51
BC

3 a What is hashing? What properties should a hash function demonstrate? [10]


6F
EB
0E
12
EC

2B
52

AB
34

1E

D1

8C
C9

FD
E1

b Write a program to implement a stack using linked list. [10]


CE

25

EB
0E
12
4B
2B

B6
1E

95

1E

4 a Consider the following sorted array DATA with 13 elements: 11, 22, 30, 33, 40, [10]
D1

8C
E3
FD

BA
BC
BE

25

0E
12
EC
B6

CE

44, 55, 60, 66, 77, 80, 88, 99 Illustrate the working of binary search technique
95
34
D2

1E

D1
E1

BC

E8
CE
6F

25

12

while searching an element (i) 40 (ii) 85.


2B

10
1E

95
AB

34

1E
FD

2D
BC
CE
BE

b What is a Binary search tree? Construct a Binary search tree for the following [10]
25
EB

B6

E1
1E

95
34
D2
8C

BA

elements. 13, 3, 4, 12, 14, 10, 5, 1, 8, 2, 7, 9, 11, 6, 18


51
BC
CE
BE
6F
0E

52
CE

1E
AB

34
D2

5 a Explain insertion sort using an example. Write an algorithm for it and comment [10]
C9
CE
E8

BE
6F
EB

4B
10

on its complexity
1E
AB

D2
8C

E3
2D

BE
6F
EB
0E

EC

b Write short notes on BFS and DFS algorithms. [10]


E1

AB

D2
D1

8C

E1
51

6F
EB
0E
12

2B
AB
1E

D1

8C

FD
25

EB
0E
12

B6
95

1E

D1

8C

BA

13373 Page 1 of 2
BC

25

0E
12

CE
95
34

1E

D1
BC

E8
25

12

10

E1ECE34BC95251E12D10E8CEBAB6FD2B
95
34

1E
34 51 0E B6 E1
BC E1 8C FD EC
95 2D EB 2B E3
34 25 10 AB E1 4B
BC 1E E8 6F EC C9
95 12 CE D2 52
D1 BA E3 51
25 0E BE 4B E1
1E 8C B6 1E C9 2D
12 EB FD CE 52
95 D1 2B 34 51 10

13373
25
6 a
0E AB E1 BC E1 E8
1E 8C 6F EC 2D CE
12 EB D2 95 BA
D1 BE
E3 25 10
0E AB 4B 1E E8 B6
1E 8C 6F 1E C9 12 CE FD
12 CE 52 D1 BA 2B

Symbol
D1 EB D2
BE 34 51 0E B6 E1
AB E

Frequency
0E BC E1 8C

each symbol.
8C 6F 1E 2D EB FD CE
EB D2 CE 95 2B 34
34 25 10 AB E1
10 BE 1E E8 BC
AB E

9
A
E8 1E BC 12 CE 6F 95
CE 6F CE 95 D1 D2 CE 25
D2 25 BA BE 34 1E
BA BE 34 1E 0E B6 BC
3. display the nodes.

B6 BC 8C 1E 12
2. delete the last node

1E 12 EB FD CE 95 D1
FD CE 95 D1 2B 34 25 0E
B
25 12 1E
1. insert a node in the end

2B 34 1E 0E AB E1 BC 8C
E1 BC 12 8C 6F E CE 95 12
D1 EB
EC 95 D1 EB D2 25 AB
to perform the following operations:

E3 25 AB BE 34 1E 0E
4B 1E 0E 1E BC 12 8C 6F
12 8C 6F 95 EB D2
5

C9
C

D1 EB D2 CE 25 D1 BE
52 BE 34 0E AB
51 0E AB 1E 8C 6F 1E

Page 2 of 2
1E BC 12
E1 8C 6F 95 EB D2 CE
2D EB D2 CE 25 D1
0E AB BE 3 4B
34
------------------------------

10 AB BE BC 1E 8C 6F 1E C9
E8 1E 5
D

12
45

CE 6F CE 95 D1 EB D2 CE
BA D2 25 0E AB BE 34
BE 34 1E 1E BC
8C 6F

E1ECE34BC95251E12D10E8CEBAB6FD2B
B6 1E BC 12 CE 95
FD CE 95 D1 EB D2 25
2B 25 0E AB BE 34 1E
34
E

1E BC 1
16

E1 BC 8C 6F 1E
E 12 EB D2 CE 95
CE 95 D1 34 25
34 25 0E AB BE BC 1E
Paper / Subject Code: 51124 / Data Structures & Algorithm

BC 1E 8C 6F 1E 12
12 EB D2 CE 95 D1
95 25 0
F

D1 34
13

25 0E AB BE BC 1E
b Given the frequency for the following symbols, compute the Huffman code for

1E 8C 6F 1E 12
95
Write a C program to implement a singly linked list. The program should be able

12 EB D2 CE D1
D1 BE 34 25 0E
0E AB BC 1E 8C
8C 6F 1E 12 E
95
[10]
[10]

EB D2 CE 25 D1
AB BE 34 1E 0E
6F 1E BC 12 8C
D2 CE 95 D1 EB
BE 34 25 0E AB
BC 1E 8C
1E 12 EB
CE 95 D1
25 0E AB
34 1

You might also like