Sid M. answered 02/25/20
Studied Computer Science and Engineering at University of Washington
Hello, Brandon,
Were I presented with this question, I'd probably either grab a pencil and a piece of paper, or maybe write a small program. Instead, I'll use text, and develop the steps to answer it, so you can follow along. First, let's restate the problem:
Determine the value for the following recursive method when x = 20.
f(x) = f(x - 5) + 2, iff x > 9; or -2, iff x <= 9
So:
Now:
