Design Analysis And Algorithms PYQ
Design Analysis And Algorithms PYQ
GROUP – A
(Multiple Choice Type Questions)
1. Answer any ten from the following, choosing the correct alternative of each question: 10×1=10
Marks CO No.
Page 1 of 5
B.TECH. / CSE / R16 / EVEN / SEM-4 / CS402 / 2020-2021
(x) The time taken by linear search algorithm to search a key in a sorted 1 3
array of n elements
a) O (log n)
b) O (n)
c) O (nlogn)
d) O (n2)
Page 2 of 5
B.TECH. / CSE / R16 / EVEN / SEM-4 / CS402 / 2020-2021
(xii) For the following program, calculate Big O analysis of the running 1 5
time (in terms of n)
For (i=0; i<n; i++)
A[i] = c ++ ;
a) O(n-1)
b) O(n)
c) O(n2)
d) O(log n)
GROUP – B
(Short Answer Type Questions)
Answer any three from the following: 3×5=15
Marks CO No.
Page 3 of 5
B.TECH. / CSE / R16 / EVEN / SEM-4 / CS402 / 2020-2021
GROUP – C
(Long Answer Type Questions)
Answer any three from the following: 3×15=45
Marks CO No.
8 7
9
4 b c d
2 9
a 11 4 e
7
i 6 f
8 10
h
2
g
1
Find the minimum cost spanning tree by Prim’s algorithm.
(c) which one is better between Binary Search and Linear Search, and 3 4
why?
(c) 7 5
Find out the maximum profit.
Jobs J1 J2 J3 J4 J5
Profits 20 15 10 5 1
Deadlines 2 2 1 3 3
Page 4 of 5
B.TECH. / CSE / R16 / EVEN / SEM-4 / CS402 / 2020-2021
10. (a) What do you mean by max heap and min heap? 4 1
11. (a) Define Augmenting path, sink and Residual network. 2+2+2 1
(c) Apply any one graph traversal algorithm on the above graph. 7 5
B F
C
A
H
D
E
G
Page 5 of 5