1 votes 1 votes suppose merge sort takes 2 sec to sort a set of 64 keys then how much time will take to sort a set of 512 keys? here, ans is 24 sec how it is plz explain me. Algorithms time-complexity merge-sort sorting divide-and-conquer + – meethunjadhav asked Jul 30, 2018 • retagged Jun 18, 2022 by makhdoom ghaya meethunjadhav 433 views answer comment Share Follow See all 2 Comments See all 2 2 Comments reply Anand. commented Jul 30, 2018 reply Follow Share $T(n)= c\times n \log n $ $\Rightarrow 2 =c \times 64 \log _2 64=c \times 384\Rightarrow c=\frac{1}{192}$ $T(512)=c \times 512 \log_2 512=\frac{1}{192} \times 512 \times 9 =24$ 1 votes 1 votes meethunjadhav commented Jul 30, 2018 reply Follow Share thanks.. 0 votes 0 votes Please log in or register to add a comment.
2 votes 2 votes for merge sort time complexity => nlog2(n) = t 64 log(64) =2 ==> 26 * 6 = 2 .... 1 than 512 log (512) ==> 29 * 9 = t .... 2 dividing 1 by 2..... t = 23*3 which is equal to 24ans. arvin answered Jul 30, 2018 arvin comment Share Follow See all 0 reply Please log in or register to add a comment.