Computer Science 9608 · 19

Computational thinking and problem-solving

49 questions. Open a question to solve it and check the official answer.

2016 May-June · Paper 43 · Q2(b)(i)

Recursion · 4 marks · official answer ready

(i) Complete the trace table for the dry-run of the pseudocode for the procedure CALL X(1, 9). MyList Index Item 1 2 3 4 5 6 7 8 9 10 [4]

2016 May-June · Paper 43 · Q2(b)(ii)

Recursion · 1 mark · official answer ready

(ii) State the purpose of procedure X when used with the array MyList. ............................................................................................................…

2015 October-November · Paper 41 · Q4(c)(i)

Recursion · 5 marks · official answer ready

(i) Complete the pseudocode: 01 PROCEDURE TraverseTree(BYVALUE Root: INTEGER) 02 IF Tree[Root].LeftPointer ................................................................. 03 THE…

2015 October-November · Paper 41 · Q4(c)(ii)

Recursion · 2 marks · official answer ready

(ii) Explain what is meant by a recursive procedure. Give a line number from the code above that shows procedure TraverseTree is recursive. .......................................…

2015 October-November · Paper 41 · Q4(c)(iii)

Recursion · 1 mark · official answer ready

(iii) Write the pseudocode call required to output all names stored in Tree. ......................................................................................................…

2015 October-November · Paper 43 · Q4(c)(i)

Recursion · 5 marks · official answer ready

(i) Complete the pseudocode: 01 PROCEDURE TraverseTree(BYVALUE Root: INTEGER) 02 IF Tree[Root].LeftPointer ................................................................. 03 THE…

2015 October-November · Paper 43 · Q4(c)(ii)

Recursion · 2 marks · official answer ready

(ii) Explain what is meant by a recursive procedure. Give a line number from the code above that shows procedure TraverseTree is recursive. .......................................…

2015 October-November · Paper 43 · Q4(c)(iii)

Recursion · 1 mark · official answer ready

(iii) Write the pseudocode call required to output all names stored in Tree. ......................................................................................................…

2015 May-June · Paper 43 · Q6(b)

Recursion · 2 marks · official answer ready

(b) Explain how a stack is used during the execution of a recursive procedure. ....................................................................................................…