30 Problem Solving Techniques May 2022
30 Problem Solving Techniques May 2022
!o
I Sernester B.A./B.Sc. Examination, May 2422
(NEP -2A21 -22 and Onwards)
COT\]!PUTER SCIENCE
Problem Solving Techniques
Time '. TYz frours Max. Marks : 60
PART _ A
l. Answer any four questions. Each question carries two marks. (4x2=8)
1) What are the factors affectinE the analysis of algorithms ?
PART * B
ll. Answer any four questions. Each question carries five marks.
7) Explain the various qualitative aspects of a good algorithm.
8) Explain if...else with an example. i
P.T.O.
NP - 115 I rfiililt ilil lil it!fl tfit llri ffit
PAFIT -C
lll. Answer any four questions. Each question carries eight marks. (4x8=32)
13) Explain the various asymptotic notations used to represent the running
time of algorithm. I
14) Write a C program to read a nurnber, reverse the number and check
whether it is a palindrome or not. 8
15) a) Explain switch statement with an example. 4
b) Differentiate between while and do...while loops. 4
16) a) Write an algorithm to check whether a number is prime or not. 4
bi Write an algorithm to find the square root of a number . 4
sort.
17) Expiain selection sofi and insertion I
i8) Explain binary search technique wiih an example. I
,t,