Multiple choice

Which of the following statements is the most appropriate regarding recursion?

  1. We should not use recursion because iteration is always more efficient.

  2. We write less code if we use iteration instead of recursion.

  3. Recursion is always the most efficient technique to solve problems.

  4. In recursion, we divide a problem into subtasks where one subtask can be a smaller version of the original problem.

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Recursion solves problems by breaking them into smaller instances of the same problem. The function calls itself with reduced input until reaching a base case. This divide-and-conquer approach is the essence of recursive thinking. Options A and B are incorrect - recursion has valid uses and is not about writing less code. Option C is wrong - recursion is not always most efficient due to overhead.