19.2 Recursion
7 questions in this subtopic. Open a question to solve it and check the official answer.
Recursion · 5 marks · official answer ready
(i) Complete the pseudocode: 01 PROCEDURE TraverseTree(BYVALUE Root: INTEGER) 02 IF Tree[Root].LeftPointer ................................................................. 03 THE…
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. .......................................…
Recursion · 1 mark · official answer ready
(iii) Write the pseudocode call required to output all names stored in Tree. ......................................................................................................…
Recursion · 5 marks · official answer ready
(i) Complete the pseudocode: 01 PROCEDURE TraverseTree(BYVALUE Root: INTEGER) 02 IF Tree[Root].LeftPointer ................................................................. 03 THE…
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. .......................................…
Recursion · 1 mark · official answer ready
(iii) Write the pseudocode call required to output all names stored in Tree. ......................................................................................................…
Recursion · 2 marks · official answer ready
(b) Explain how a stack is used during the execution of a recursive procedure. ....................................................................................................…
