Exam-style question
Try this first
Which pair best describes the two essential parts of a typical recursive solution?.
- A.A base case and a general case
- B.An input statement and an output statement
- C.A loop and an array
- D.A variable declaration and a comment
Model answer
What a good answer should say
- A base case and a general case
Explanation
Why this works
The base case provides a stopping condition. The general case reduces or changes the problem and makes a recursive call.
Common mistake
No common mistake is linked to this question yet.
