public static void fun3(int i)
{
if(i<10)
{
fun3(i+1);
fun3(i+2);
System.out.println(i);
}
}
Recurrence for this code is: T(n)=T(n+1)+T(n+2)+O(9)
the problematic thing is if condition here if(i<10)
. Where i
can grow to infinity towards the negative side (e.g -1000, or -287131287238238 etc). I need its time complexity using recurrence tree. How to calculate height of the tree??