in Algorithms
472 views
1 vote
1 vote
The runtime of a divide-and-conquer algorithm is described by the following recurrence: T(n) = 3T(n/2) + O(1). How many subproblems will we have at the 5th level of recursion if the top level is considered to be the 0th level__________?
in Algorithms
472 views

2 Comments

at level 5, there will be $243$ subproblems each of size $\frac{n}{32}$
0
0
At level k, we will be having $3^k$ subproblem and size of each subproblem at level K will be $\frac{n}{2^k}$.

For k = 5, we will be having $3^5$ subproblem.
0
0

Please log in or register to answer this question.

Related questions

0 votes
0 votes
1 answer
4