Computer Science I / Recursion and Iterative Alternatives
Practice question · Select all that apply

Select every statement the lesson supports about choosing recursion over iteration.

Hints
  1. The lesson says the choice is about clarity and cost, which options claim something stronger?
  2. One tempting option would mean recursion is more powerful, not merely more convenient.
Show the answer
  • A. Recursion can express naturally-recursive problems such as trees more clearly
  • B. Each recursive call carries overhead and occupies space on the call stack
  • C. Iteration is usually more memory-efficient for simple repetition
Why

Anything recursive can be written iteratively and vice versa, so neither is more capable; the real differences are clarity for nested problems against the per-call time and stack cost. Believing recursion can do more than iteration is the misconception the lesson corrects, and 'always shorter' is a style claim the lesson never makes.

Read the lesson: Recursion and Iterative Alternatives →

Practise Recursion and Iterative Alternatives

The app has 6 more questions on this lesson, and keeps your place in the course. Computer Science I is free to start.

More questions on Recursion and Iterative Alternatives