Complexity of iterative exponentiation
You are unsure how to answer the question. 

When you are unsure: I method that does usually not work is trying to think about the problem very hard and waiting for inspiration. It doesn't come. 

A method that works quite well is using pen and paper and trying it out. And you'll find that f (2, 64) calls f (64, 1) which doesn't make any further calls. 

Now try f (10, 64) -> f (64, 9) -> f (9, 63) -> ... -> f (3, 57) -> f (57, 2) -> f (2, 56) -> f (56, 1). It should be easy to figure out the exact number of multiplications. 

But then you need to check for the cases where the recursion doesn't end, and that is when we miss the test "n = 1" altogether because n &lt; 1. If n &lt; 1 then we call f (n, x-1). If x-1 &lt; 1 as well then the recursion never ends. So that is the case when n &lt; 1 and x ≤ 1. 

PS. This function does not calculate x^n.