2 votes 2 votes what the time complexity for T(n)=5T(n/2)+n^2 a. n b.n^2 Algorithms time-complexity recurrence-relation + – akankshadewangan24 asked Jul 4, 2017 • retagged Jul 9, 2022 by Lakshman Bhaiya akankshadewangan24 451 views answer comment Share Follow See 1 comment See all 1 1 comment reply joshi_nitish commented Jul 4, 2017 reply Follow Share it will be about O(n^3) 0 votes 0 votes Please log in or register to add a comment.
0 votes 0 votes T(n)=5T(n/2)+n^2 Applying master theorem , a=5 b=2 f(n)=n2= O(nlogba-¢) = O(nlog25-1) = O(n2) Case : 1 So complexity is O(nlog25) Arnab Bhadra answered Jul 4, 2017 Arnab Bhadra comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes master theorem T(n)=5T(n/2)+n^2 a=5,b=2,K=1,P=0 Case 1: if a>bk, then T(n)=O(nlogba) T(n)=O(nlog25 ) gabbar answered Jul 22, 2017 gabbar comment Share Follow See all 0 reply Please log in or register to add a comment.