2 2 votes Solve the recurrence:$T(n) = T(n/5) + T(4n/5) + O(n)$$O(n)$ $O(n\log n)$ $O(n^2)$ $O(\log n)$ Algorithms goclasses goclasses-da-dpp goclasses-da-dpp-day-238 goclasses-cs-dpp goclasses-cs-dpp-day-336 algorithms python-&-dsa goclasses-python-&-dsa-practice-questions goclasses-algo-practice-questions + – GO Classes 126 views answer comment Share Follow Print 0 reply Please log in or register to add a comment.
0 0 votes Given:$T(n)=T(n/5)+T(4n/5)+O(n)$At each level of the recursion tree, the total size of all subproblems is:$n/5+4n/5=n$Therefore, the total work at each level is $O(n)$.The longest branch repeatedly reduces the problem size by a factor of $4/5$, so the recursion tree has $O(\log n)$ levels.Thus:$T(n)=O(n)\cdot O(\log n)$$\boxed{T(n)=O(n\log n)}$Answer: B GO Classes answered Jul 29 GO Classes comment Share Follow 0 reply Please log in or register to add a comment.