The newest 13 of 13 written questions. Open one to see it on the real paper.
Explain the reasons why a stack is used when a recursive algorithm is executed.
See it on the paper →Describe what is meant by recursion.
See it on the paper →A binary tree can be used to implement recursion. Identify one feature of an algorithm that makes it beneficial to use recursion. Give one example of an application that could use a recursive algorithm. Feature
See it on the paper →The recursive procedure Delete() is defined as follows: PROCEDURE Delete(Index, Target) IF Numbers[Index] > 0 THEN IF Numbers[Index] >= Target THEN Numbers[Index + 1] Numbers[Index] ENDIF Index + 1 Index CALL Delete(Index, Target) ENDIF ENDPROCEDURE ← ← An array Numbers is used to store a sorted data set of non-zero po...
See it on the paper →Describe what is meant by recursion.
See it on the paper →A Fibonacci sequence is a series of numbers formed by adding together the two preceding numbers, for example: 0, 1, 1, 2, … This function calculates and returns values in the Fibonacci sequence and uses recursion. FUNCTION Fib(Number : INTEGER) RETURNS INTEGER IF Number <= 1 THEN Result ← Number ELSE Result ← Fib(Numbe...
See it on the paper →Describe the purpose of both the A* algorithm and Dijkstra’s algorithm.
See it on the paper →Describe what is meant by recursion.
See it on the paper →A Fibonacci sequence is a series of numbers formed by adding together the two preceding numbers, for example: 0, 1, 1, 2, … This function calculates and returns values in the Fibonacci sequence and uses recursion. FUNCTION Fib(Number : INTEGER) RETURNS INTEGER IF Number <= 1 THEN Result ← Number ELSE Result ← Fib(Numbe...
See it on the paper →State three essential features of recursion.
See it on the paper →Explain the reasons why a stack is a suitable Abstract Data Type (ADT) to implement recursion.
See it on the paper →State three essential features of recursion.
See it on the paper →Explain the reasons why a stack is a suitable Abstract Data Type (ADT) to implement recursion.
See it on the paper →The majority of candidates understood that recursion involved a function or procedure defined in terms of itself and achieved at least one mark for this. Many of these candidates were also able to achieve the second mark by expanding on this, for example by describing the use of a base case.
— Examiner report, May/June 2023, 9618/31 Q12(a) (Cambridge)
Candidates generally appeared to find the trace of the given recursive function difficult. However, a significant number of candidates achieved four or five marks.
— Examiner report, May/June 2023, 9618/31 Q12(b) (Cambridge)
Most candidates were able to describe the purpose of both the A* algorithm and Dijkstra’s algorithm as being used to find the optimum path between two nodes on a graph, or similar.
— Examiner report, May/June 2023, 9618/33 Q2(b) (Cambridge)
Past papers, syllabus and examiner reports © UCLES (Cambridge University Press & Assessment). Questions are matched to topics from the official syllabus. AssessPro is independent and not endorsed by Cambridge.