Question 6(b) 2015 · October-November · Paper 32 · 15 marks
Reveal official mark-scheme answer
Official answer for Question 6
Part (b)
Part (b)
(i)
A – Parameter identifiers labelled
Question 1
Question 1
Show text version of question
Question 6
Part (b)
Question 6
. . . .
2000
Question 12
Part (c)
An algorithm is designed in pseudocode to search the binary tree for a particular food name.
The algorithm uses the additional variables below:
Variable Data type Description SearchFood STRING Food name to search for Current INTEGER The array subscript for the item currently considered IsFound BOOLEAN Flags to TRUE when SearchFood is found
Complete the algorithm below:
//binary tree search
INPUT SearchFood
IsFound ← ............................................................................................................................
Current ← ............................................................................................................................
REPEAT
IF Food[Current] = ......................................................................................................
THEN
//found
OUTPUT "Found"
.......................................................................................................................................
ELSE
IF SearchFood < Food[Current]
THEN
// move left
Current ← LeftPtr[Current]
ELSE
...............................................................................................................................
ENDIF
ENDIF
UNTIL IsFound = TRUE OR ...............................................................................................
IF IsFound = FALSE
THEN
OUTPUT SearchFood "Not Found"
ENDIF
Question 13
Part (d)
(i)
The dataset used in part
Part (b)
was:
MELON, BEETROOT, TURNIP, APPLE, PARSNIP, SWEDE, QUINCE
Draw the binary tree.
subtrees.
(ii)
State whether or not this is a well-balanced tree.
...........................................................................................................................................
.......................................................................................................................................[1]
Question 14
5 A busy main road connects Town A and Town B. A large new housing development is being built near the main road. A new road from the housing development will connect to the main road. Traffic control signals are planned for the junction.
It is proposed to simulate the traffic flows to assist the planning of the traffic control system.
7RZQ$
+RXVLQJ
- XQFWLRQ
GHYHORSPHQW
7RZQ%
Part (b)
Data will need to be collected before a simulation can be carried out.
Name two datasets which will be collected.
1 ................................................................................................................................................
...................................................................................................................................................
2 ................................................................................................................................................
...............................................................................................................................................[2]
Question 15
Why this question appears here
72% assigned-topic match · Hardware › Logic gates and logic circuits
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_w15_qp_32.pdf
