public int mystery(int b)
{
    if (b == 0)                    // checks if 1 == 0, which is false
        return 0;
    
    if (b % 2 == 0)                // checks if 1 is even, which is false
        return mystery(b - 1) + 3; // call 1
    else
        return mystery(b - 1) + 2; // call 2
                                   // stops at call 2 and calls m(0)
}

Call stack

m(0)
m(1)2
m(2)1
m(3)2
m(4)1
m(5)2

Forward to Step 7
Back to Step 5
Back to main example