How to solve the below relation
This will not be a balanced tree.
and for k levels i have something like
How can i find the T(n) for this??
How to solve the below relation
This will not be a balanced tree.
and for k levels i have something like
How can i find the T(n) for this??
Copyright © 2021 JogjaFile Inc.
You are on the right track. You are building a tree at every level of which you pay at most $cn$. As you mention, the number of levels for which this goes on is at most $\log_{100/99} n$. We pay at most $cn\log_{100/99} n$. The solution of the recurrence is $O(n\log n)$.