How to find time complexity using the Master's Theorem
Data Structures and Algorithms
In this article, we will learn the Master's Theorem from Daniel's story.
One beautiful morning, Daniel was preparing for his dream job. Daniel is an engineering graduate. He is very hardworking, but he is also lazy. He is studying data structures and algorithms. He also has a friend named Therese, who is pretty smart and good at data structures. Let's see how Therese influences Daniel to learn the Master's Theorem
Formula
Problem 1
STEP 1:
STEP 2:
STEP 3:
STEP 4:
After substituting the value.
STEP 5:
Problem 2
Repeat the same steps that we did before.
STEP 1:
STEP 2:
STEP 3:
STEP 4:
STEP 5:
Without deriving a lot of derivations, we can find the Time Complexity. But only recurrence relations involving fractional figures are suitable for Master's Theorem.