What will be the Time complexity of the given algorithm, by substitution or recurrence tree method

Viewed 25

enter image description here

What will be the time complexity of this algorithm, can anyone explain itbin detail. We have just figured out that when n is in the form of 2^x then only it reaches the base case . And we were taking it as T(n) = T(n/2) + T(3n+1)

Note this is not an infinite loop as collatz conjecture (3n-1).

1 Answers
Related