A tail-recursive method
- A
Always slower
- B
Has multiple returns
- Ccheck_circle
Has the recursive call as the last action
- D
Has no base case
Explanation
Java does not auto-optimize tail recursion (unlike Scheme), but the structure is still useful.
AP Computer Science A· difficulty 4/5
A tail-recursive method
Always slower
Has multiple returns
Has the recursive call as the last action
Has no base case
Explanation
Java does not auto-optimize tail recursion (unlike Scheme), but the structure is still useful.
Want 10 more like this — adaptive to your weak spots?