Question 9593 – GATE 2003
December 16, 2023
Question 9781 – Data-Structures
December 16, 2023
Question 9593 – GATE 2003
December 16, 2023
Question 9781 – Data-Structures
December 16, 2023

Question 8421 – Algorithms

Assume that a mergesort algorithm in the worst case takes 30 seconds for an input of size 64. Which of the following most closely approximates the maximum input size of a problem that can be solved in 6 minutes?  

Correct Answer: B

Question 15 Explanation: 
Time complexity of merge sort = O(n log n) = an log n
where c is some constant
It is given that for n = 64,
cn log n = 30
c × 64 log 64 = 30
c × 64 × 6 = 30
c = 5/64
Now, the value of n for
c n log n = 360
5/64 × n log n = 360
n log n = 360×64/5
= 72 × 64 = 29 × 9
So for n = 29, it satisfies.
So, n = 29 = 512
A
256
B
512
C
1024
D
2048
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!!