1.

Under what case of Master’s theorem will the recurrence relation of merge sort fall?(a) 1(b) 2(c) 3(d) It cannot be solved using master’s theoremI have been asked this question during an internship interview.Enquiry is from Masters theorem topic in chapter Recursion of Data Structures & Algorithms II

Answer»

The CORRECT option is (b) 2

Best EXPLANATION: The RECURRENCE relation of merge sort is given by T(n) = 2T(n/2) + O(n). So we can observe that c = Logba so it will FALL under CASE 2 of master’s theorem.



Discussion

No Comment Found

Related InterviewSolutions