382 views
1 votes
1 votes
What is the running time of following recurrence relation?

T(n) = T(n/2) + T(n/4) + T(n/8) + n

2 Answers

0 votes
0 votes
Can be written as T(n) = T(n/2)  + theta(n).
T(n) = n + n/2 +n/4 + n/8.........
T(n) = n(1 + 1/2 +1/4......).
T(n) = n*1.
T(n) = theta(n)