I want to calculate O(n log(n)) without using the master theorem.
Does anyone know a mathematical way of calculating O(n log(n)) from the recursive formula T(n) = 2T(n/2) + O(n)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Draw a recursion tree:
height of the tree will be log n
cost at each level will come out to be constant times n
Hence the total cost will be O(nlogn). http://homepages.ius.edu/rwisman/C455/html/notes/Chapter4/RecursionTree.htm
And you can always prove it by induction if you want.