Question

calculate the complexity of the below recursive code Int f(int
n) { If(n return 1; return f(n/2)+f(n/2); }

A T(n)= 2T(n/2)+O(1)
B T(n)= T(n/2)+O(1)
C T(n)= 2T(n/4)+O(1)
D T(n)= 2T(n/6)+O(1)
E none
Practice Next

Hey! Ask a query