Assume that a merge sort 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?
Whats the answer and explanation?
Assume that a merge sort 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?
Whats the answer and explanation?
hi ishwar
Time complexity of merge sort is Θ(nLogn)
c64Log64 is 30
c64*6 is 30
c is 5/64
For time 6 minutes
5/64nLogn = 660
nLogn = 72*64 = 512 * 9
n = 512.