- Back in
recur(32)
- Finished the recursive call, got back
"101"
- Computes
"2" + "101"
, which is"2101"
- Stops and returns
"2101"
Resulting call stack
r(1) returns "1"
r(3) dig -> "0" "0" + "1" returns "01"
r(10) dig -> "1" "1" + "01" returns "101
r(32) dig -> "2" "2" + "101" returns "2101"
Navigation
Back to Step 7
Back to main solution
Back to 2009 AP CS A MC explanations