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

Algorithm

Rgpv dioma paper

Uploaded by

Gulshan pwr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Algorithm

Rgpv dioma paper

Uploaded by

Gulshan pwr
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

FnantT!

8s Total Pages : 4

Third Semester
Computer Science & Engineering/IT
Scheme OCBC July 2022
ALGORITTIMS
Time : Three Hours Maximum Marks : 70
Note :I Atternpttotalsxquestions. QuestionNo. I (Objectivetype) is
compulsory. From*re ranaining questions attempt Ntyfwe.
gf, E: qen 6f, frfrqr qaq mqi6 I (T€ftg rflI oT)
qM, tr tq qqii { t fr-€f qiq o} Ea 6ftqr
0 In case of any doubt or dispute, the English version question
shouldbe treated as final.
ftffi $ s-n'n h rik 3Ter{r fi-{rq fi Rifr it GiM qrqr b
qai +i Gifrq HTr qrimr

1. Choose the correct answer. 2 each


wS sorn ol aq-q'ffirqr
0 Which ofthe following algorithm design technique is used inthe
quick sortalgorithm?
(a) Dynamicprogramming (b) Backtracking
(c) Divideandconquer (d) Greedymethqd
fu6 HfC qdilRelq { fqrr { fr otq-S \EilReH R-ql{{
iln+o, sqqtr ilfr t?
(ei) srqifto qbnft'r (a) @ffirr
(q) BErgs * 6itr{ (q) ff$ +Qrs

tr) What is the worstcase complexity ofbubble sort?

r€ fis ofidffi rqr t?


a+a qYd A
(a) O(nlogn) O) o(n)
(c) o(n2) (d) o(logn)

Ft2023t7485 P.T.O.
121

fl) Asymptotic analysis is_bound.


(a) Output (b) krput
(c) Outer (d) hner
sfrrErCrfr-o qnfrfu-fl qnis tr
(ei) erc-cge (q) gqge
(s) ense< (q) aqT
iV) In a queue, if a user ffies to remove an element from empty queue,
'
it is called
(a) Underflow (b) Overflow
(c) Emptycollection (d)Garbagecollection
\.6'rtii, qR \'6 q[sr ftm qS ro srqrrq E-eri r,r $qlH
.nror t, {6 _ ooaror t
(ei)eis-<vd (e) 3{tnqa}
(q) qq8 m-#+em (q) qdq o-&qam
v) How many types of compressions are there?
m'Eiqq fr;oi non mr tor ta
(a) 4 (b) 3
(c) s (d) 2

2. a) Whatisthetimecomplexityofanalgorithm?, 2
q6 \F,rilfuqq fr er{q EFIQBHA rqr ta
b) Define stack. Write applications ofstack. 4
e6 oi qfurR-d fiftqr e6 fr sqqift-dT ftfuqr
c) Whatis setsandmultisets?Explainwith example. 6
+c afu Tdte aqr tz sqrd{ul wFo wqsrgqr

3. a) Whataretheadvantagesanddisadvantagesofbubblesort? 2
T{d qfC h anr dt{ 6ftqf eqr ta
b) Explainhowmergesortworkswithexample? 4
,r$ qfC Ad oTd oror t r{flq sFo srsrEqr
c) Write an algorithmto implement selection sort. 6
Rdqqlq qiC o1 Ediic o{i } ftq q-dilR?rq ftfuqr
Ft2023t748s Contd.....
t3l

4. a) Whatishashtable? 2
ter ti-d rqr t?
b) What are the advantages of balanced search tree? 4
d-i{-s q-d * }'eqr drtr t?
c) Consider a l0 slots the following keys are inserted
hash table wittr
in the order 34, 16,2,93, 80, 77, 51. The hash function is
h(k) : kmodl0. What will be the hash table? 6
10 Ffd fr go teT t{d dfrqr ftq keys o\ qs mq ii srfrq
34, I 6, 2, 93, 80, 7 7, 5 1 tqr qtq{rt h(k) : kmodl 0 t, tqr &f,
Tqr dlrn?

5. a) WhatisGraph?Definepathalso. 2
qTs'qrqt tf qrq 6) tfr qfu+rfrd fiftqr
b) example. 4
Describe directed andundirected graph with
slqHs eflc an-r-slqHs ilE fr vEr{tur qFo qrsr fifrqr
c) Explainflow-basedalgorithm 6
d-+€ gdilRqq o1 q=rs{r{qr
6. a) Define lossy and lossless compression. 2
EiS Gfu ffi{T o-d$q o} qffid fifrqr
b) How a substring is searched in a sting? 4
\tr &q { t rq qqBr trt'qai te
c) Writeanalgorithmtoreverse sting " 6
qo ffi d q-dei h frq \-dilRem ftfuqr
7. a) Definequeue. 2
qot qfuirfr-d ffirqr
b) Explainbinarysearchteewithexample. 4
qrfl-S Hd *
oi s<rdqur sFo s{sr{qr
c) Sort the following arrayusing bubble sort. Show each step. 6
44,11,99,33,55,99,22
qe-n qfd ERr ftq tt o1 efC fifrqr q*ft qrit oi EeTHr

44, II,99,33,55,99,22
Ft2023t7485 P.TO.
t4l

8. Writeshortnoteonanytwoofthefollowing. 12

, Programmingmodels
0 Symboltable
O Minimumspanningteealgori*rm
iv) Regularexpression
ft'q iT t
m-6 d qr dfhg ftHUft fttuqr
D MqTr qfrffi
D ftEid tq-d

D ftftqq dfh il \lailRerq


iv) \ar s-wfur

- a\.A!&

Ft2023t7485

You might also like