0 votes 0 votes int x = 0; int f(n) { if(n == 1) return; else { x += 4*A(n/2) + n^2 return X; } What will be the recurrence relation and time complexity ?? jatin khachane 1 asked Jul 22, 2018 jatin khachane 1 428 views answer comment Share Follow See all 7 Comments See all 7 7 Comments reply Show 4 previous comments jatin khachane 1 commented Jul 22, 2018 reply Follow Share Means writing 2*A(n/2) and A(n/2)+A(n/2) in code will cause different time complexities ??..how beautiful it is 0 votes 0 votes Shaik Masthan commented Jul 22, 2018 reply Follow Share Yes.... But values return by them are equal 1 votes 1 votes Shubham Shukla 6 commented Jul 22, 2018 reply Follow Share time complexity recurrence relation would be different...but if you need to calculate values than their recurrence relation would be same..! For value both will have=2T(n/2)+O(1) and for complexities 1st will have T(n)=T(n/2)+O(1) and 2nd eqn will have T(n)=2T(n/2)+O(1) 0 votes 0 votes Please log in or register to add a comment.