Recursion

AP Computer Science A· difficulty 4/5

To compute factorial of 10000:

  • A

    Both equally efficient

  • B

    Cannot compute

  • C

    Naive recursion (may overflow stack)

  • D

    Iteration (safer for large n)

    check_circle

Explanation

Iterative loop avoids stack overflow risk.

Want 10 more like this — adaptive to your weak spots?

Related questions