Computer Science For First Examination In 2021 9618 · 19

19.2 Recursion

47 questions in this subtopic. Open a question to solve it and check the official answer.

Reset
2021 October-November · Paper 41 · Q1(b)(i)

Recursion · 3 marks · official answer ready

(i) For each of the three function calls, the main program needs to: • output the value of the two parameters • call the function with those parameters • output the return value. …

2021 October-November · Paper 41 · Q1(b)(ii)

Recursion · 2 marks · official answer ready

(ii) Take a screenshot to show the output from part (b)(i). Copy and paste the screenshot into part 1(b)(ii) in the evidence document. [2]

2021 October-November · Paper 41 · Q1(c)

Recursion · 7 marks · official answer ready

(c) Rewrite the function Unknown() as an iterative function, IterativeUnknown(). Save your program. Copy and paste the program code into part 1(c) in the evidence document. [7]

2021 October-November · Paper 41 · Q1(d)(i)

Recursion · 1 mark · official answer ready

(i) For each of the three function calls, the main program needs to: • output the value of the two parameters • call the iterative function with those parameters • output the retu…

2021 October-November · Paper 41 · Q1(d)(ii)

Recursion · 1 mark · official answer ready

(ii) Take one or more screenshots to show the output of both functions for each set of parameters. Copy and paste the screenshot(s) into part 1(d)(ii) in the evidence document. [1…

2021 October-November · Paper 41 · Q4

Recursion · 9 marks

4 Take a screenshot to show the output after the given data are entered. Copy and paste the screenshot into part 3(d)(ii) in the evidence document. [1] 11 (e) An in-order tree tra…

2021 October-November · Paper 41 · Q4(e)(i)

Recursion · 8 marks

4 Take a screenshot to show the output after the given data are entered. Copy and paste the screenshot into part 3(d)(ii) in the evidence document. [1] 11 (e) An in-order tree tra…