1.

What is the result of the recurrences which fall under first case of Master’s theorem (let the recurrence be given by T(n)=aT(n/b)+f(n) and f(n)=n^c?(a) T(n) = O(n^logba)(b) T(n) = O(n^c log n)(c) T(n) = O(f(n))(d) T(n) = O(n^2)I got this question by my college professor while I was bunking the class.This key question is from Masters theorem in section Recursion of Data Structures & Algorithms II

Answer»

The correct choice is (a) T(N) = O(n^logba)

The best explanation: In FIRST case of master’s theorem the necessary CONDITION is that c < logba. If this condition is true then T(n) = O(n^logba).



Discussion

No Comment Found

Related InterviewSolutions