Question 1788 – Nielit Scientist-B 17-12-2017
November 5, 2023
Question 1790 – Nielit Scientist-B 17-12-2017
November 5, 2023
Question 1788 – Nielit Scientist-B 17-12-2017
November 5, 2023
Question 1790 – Nielit Scientist-B 17-12-2017
November 5, 2023

Question 11185 – Algorithms

Consider a list of recursive algorithms and a list of recurrence relations as shown below. Each recurrence relation corresponds to exactly one algorithm and is used to derive the time complexity of the algorithm.

RECURSIVE ALGORITHM		  RECURRENCE RELATION
 P. Binary search	      I. T(n) = T(n-k) + T(k) + cn
 Q. Merge sort	             II. T(n) = 2T(n-1) + 1
 R. Quick sort	            III. T(n) = 2T(n/2) + cn
 S. Tower of Hanoi	     IV. T(n) = T(n/2) + 1 

Correct Answer: B

Question 5 Explanation: 
Quick sort – T(n) = T(n-k) + T(k) + cn
Binary search – T(n/2) + 1
Merge sort – T(n) = 2T(n/2)+ cn
Tower of hanoi – T(n) = 2T(n-1) +1
A
P-II, Q-III, R-IV, S-I
B
P-IV, Q-III, R-I, S-II
C
P-III, Q-II, R-IV, S-I
D
P-IV, Q-II, R-I, S-III
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!