Algo_endsem
Algo_endsem
J
8 printed
[This question paper contains
Roll No.220155o06O
Your
H
Sr. No. of Question
Paper : 4057
and Analysis of
Name of the Paper : Design
Algorithms
Semester : IV
17,
they wouldi
3, 9, 12, 11}.
do in
following t).
data using heap sort. p+l, q-1,
else if t
< A[g] then ternary_search(A,
4, 3, 7, 1, 8, 5, 9
(7) q+1, last, t)
else ternary_search(A,
(b)Suppose there exists an O(n) time algorithm to equation for computing the
Write a recurrence
of the above algorithm and
find the 5th smallest element in an array of size n. Justify
time complexity
Sort the following data using quick sort assuming the equation obtained by you and also solve it.
write an algorithm to
a set of n numbers,
(a) Given
74 element using
find the maximum and minimum
the
strategy. AIso, determine
divide and conquer
(7)
time complexity.
5) Write an efficient algorithm to check
if a given
undirected graph has a cycle. Discuss the time (b) Consider a of the university with 60
department
BCS102 ANIL
BCS102 BEENA
BCS102 SNEHA
MCA101 AJAY
MCA101 AMARJEET
and, so on