IT 12 April 2022

You might also like

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

nl oych / tt pri /- r o r"

Total No. of Questions : 5l SEAT No. :

P6979 --'l'1 [Total No. of


I s6sl i2 &
4

FirstYear (Management)
IT 12: I) ANDALGORITHMS LIffiARY
(Semester - I) 1

Ttme: 2% HoursJ IMax.


Instructions to tlte
1) Ail
2) From Q2 internal choiees.
3) 'full nrarks.

Ql) M l20x%=l0l
a) Ina list, insertion can be done as i;\ "
r) ii) end
all
*jF':
b) collection of nodes is AS

D Queue
iii) Linked list tack
c) In a stack , if a user tries to in full stack, it is called
, Overflow lJnderflow
iii)Empty collection ,0 Garbage collection
d) Which method is ;the top element of the stack without

e)

0 Which of the following satisfies the tree.


r) A tree which is a Binary search tree Balanced tree
ii) A node must be either Red or root node must be
black
iii) A tree with maximum three
rv) A tree which is binary search tree butrfiot strictly balanced tree and
::,: : J

A node must be either Red or Blac-hin color and root node inust be
black
P,TO.
{

o
t
ac LIBRhRY

s) Time complexity of DFS is (V-number of )


)Gl
r) O (V+E) ,.-,,.*ii) o (v)
11, 0(E) ,,,1;.'' iv) None

h) For the adjocency rnatri-x;of ar directed graph the row stlm


is degree colgmn sum is the _degree.
r) 1[, out ii) ottt,, in
*. iv) total, out
rri) in, total
r) Heap can
,) ii) Stack
iii) A affay t") Normal affay
i) case for linear search?
D
ii) O(logn)
r0 o(1)
k) In rn ith array, how rnany comparl sottS'are needed in best
t"& .)a*"i
il;l:l" 0 I
ur) n
D In what manner is a state algorithm
constructed?
r) Depth-first search
iiD Trvice around the Hearest neighbour first
m) Backtracking algori by constnrcting a tree of choices
called as
D State space ii) State chart tree
iii) Node tree 10 Backtracking tree t*.;

n) What is the other namoo,f difkstra algorithrn? ,.,;$"1

1) Single source shortest path


ii) Multip le source shortest path
iii) Multipledestination
w) Single destination shortest path problem
o) The output of kruskal and Prims algorithm 1S
i) Maxirnumspanningtree ii)
iii) Minimum spanning free iu)
p) What is the worst case comPlexi ty of
D O(nlogp)
iii) o(n) 10
q) The optional data structure used to sol ower o f Hanoi is_.
i) Tree ii);'",,,{"}ssO
rrr) Queue iv) Stack
t5s6sl-102 2
r) In dynamic programming the output to stage n become the input to
,) Stage n-l ii) Stage n it self
4

iii)Stage n+l
--,'",
5',9 Stage n-2 t
o

s) We use dynamic when ,c LBnrrXV


1) We need on
O The sub structure I
*
iit) The be reduced to 3 - SAT problem
w) It's
0 The rela of a dynamic programming problem is
called
D 0 RandomVariable
1,, iv) Transformation

Q2) a) thm to draw Binary search tree for the following data.
{
I 12, 13, A7, 09, 77, 2A, 19, 04, 05 tsl
b) BFS and DFS. t3I
C ) Min Heap. 121
OR ,n"i
a) Apply DFS algorithm on the srsuh and show the steps. t3l

b) Construct Binary data 10, 25, 2, 4, 7, 13, 11, 22 and


determine inorder, preorder?
t5l
c)
.,{r}
j"1
;'''n-'
Qs) a) Apply Rain Terace.od,lgbrithm to the followingproblem.
Inpnt:- Height : l4)::'1,, A, 3, 2, 57. Dralv the
-b".
solut!'iin. I4t
b)
t3l
) t3l
OR
a) What is Hamiltonian cycle?
t3t
b) Find the Hamiltonian cycle from
t4l

rlLu

,t-'
c) write an algorithm to count number ofnodes in singly linked list. 13l
Is86sJ-102 3
Q4) a) What is Jump Game algorithm? .ai-, t4l
b) Sortthe following data using ms1:gosort algor{thm L38,27,43,3,9, 82, 10]
I4l
c) Explain need of t21
OR
a) Illustrate the the minimum cost spanning tree for given
graph t4l

b) ple t4l
c) l2l

Qs) a) 3, ffi :24,


p: (25 ,24,15),w: (18, 15, programming. Determine
the optimal profit and t7t
b) Write an algorithm to of a linked list. 13l

a) Findthe longest tbr following stringusing dynamic


programming. .,,1:1"1

\\
X: {A, B,C, D, B, A#; D, F} \{1

Y: {C, B, A, F}
b) Write an algorithm delete element from linked list w
zeta.

t+s

i3^
i-u

4
Is86sl-102

You might also like