Recursion

AP Computer Science A· difficulty 4/5

A tail-recursive method

  • A

    Always slower

  • B

    Has multiple returns

  • C

    Has the recursive call as the last action

    check_circle
  • D

    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?

Related questions