public static int mystery(int value)
{
if(value <= 10) // checks if 3 <= 10, which is true
return value * 3; // computes 3 * 3, which is 9
// stops and returns 9
return value + mystery(mystery(value / 5));
// call2 call 1
}
Call stack
m(3) returns 9
m(15)1 15 + ____
m(5) returns 15
m(27)2 27 + ____
m(9) returns 27
m(45)2 45 + ____