Contents
Chapter 7 · Data Structure and AlgorithmPractice
← Return to textbook

CONCEPT PRACTICE

Recursive calls and terminating cases

2 related published questions. Take them one at a time.

Filter questions
Question sources

2 of 2 questions match.

ITPEC Practice
0/2 answered

Question 1 of 2

0/2 answered

2024 Autumn · Subject A · Q6

Original exam question · Select the image to enlarge
Read the question as text

The recursively defined function f(n), for natural number n, returns 1 if n ≤ 1, and otherwise returns n + f(n − 1). Determine f(5).

The original image above preserves the complete exam wording and layout.

Choose your answer
Choose an option to check your answer.
1 / 2

Source: 2024A_FE-A_Questions.pdf, PDF page 6. ID: 2024A-A-Q006. Explanation written for this textbook.

Original question · Q6
The recursively defined function f(n), for natural number n, returns 1 if n ≤ 1, and otherwise returns n + f(n − 1). Determine f(5).

Scroll horizontally to read the image at full size.