Looping Lists
Extended Response16 MarksPremium
(a).
Using the table below as a guide, trace the following algorithm by filling out the trace table below row by row (left to right).
[4]
INPUT = [2, -2, -5, 7, 0] // A collection
A=0
B=0
C=0
loop while INPUT.hasNext()
A = INPUT.getnext()
if (A => 0) then
B = INPUT.getnext()
end if
C = A+B
output C
end loop
(b).
Explain why binary search is almost always more efficient than linear search on ordered values.
[4](c).
In the context of programming, define a flag.
[1](d).
Given two arrays, ALPHA which contains 10 elements and BETA which contains 20 elements, construct an algorithm to determine whether or not ALPHA is a subset of BETA. That is, if all the items in ALPHA are also in BETA then output “SUBSET” otherwise output “NOT SUBSET”
[7]A Picture Is Worth a Thousand Words
Multiple Choice1 MarkCommunity
Chiara is developing a software solution and would like to communicate to her colleagues the data that will go in and out of the system.
Which one of the following types of diagrams would be most appropriate for Chiara to use?
(a).
a context diagram
(b).
a network diagram
(c).
a use case diagram
(d).
a data flow diagram
∇ Triangular Numbers
Short Answer3 MarksPremium
A recursive function tri(n) calculates and returns the sum of the first n natural numbers, also known as the nth triangular number. For example, tri(1), tri(2) and tri(3) return the numbers 1, 3 and 6 respectively.
Visually, the tri(n) function could be imagined as one that calculates the number of dots contained within a nabla (a triangle with its tip facing downward) for a specified height n, as shown below.
[3]Construct the function tri(n)
Ahead of the Stack
Extended Response12 MarksPremium
At the moment marathon runners cross the finishing line of a race, their names are added to a stack called RUNNERS.
For example, a diagram of RUNNERS below indicates “Ellie” has finished first and “Jessie” last. “Jessie” is at the top of the RUNNERS stack.

(a).
Using pseudocode, construct an efficient procedure that will search the stack RUNNERS for a name given via standard input. Once the given name is found, output the finishing place of the runner specified as a number. If a name is not found then the procedure should output the message "Runner not found".
Assume all names are unique, the number of elements in RUNNERS is unknown and RUNNERS may be emptied during the search process.
[6]For example, given an input string of "Joel" the procedure will output the number 2 to indicate Joel finished in 2nd place.
(b).
Outline why the use of a queue would make this algorithm simpler and more efficient than using a stack.
[2]In the same way as RUNNERS saves each runner's name, another stack called TIMES saves each runner's finishing time as they cross the finish line.
(c).
The results of a particular competition where 101 runners successfully finish a race are held in RUNNERS and TIMES. Given an empty 101x2 (row x column) 2D array called RESULTS, write pseudocode such that the first column contains the names of all those runners who finished the race and the second column contains their respective times in ascending rank order.
[3]For example, RESULTS[7][1] should contain the time of the runner who finished in 94th place, that is, having only ran faster than seven people (eighth last).
(d).
Using RESULTS, state the single line of pseudocode that represents the name of the runner with the median finishing time.
[1]Chasing Your Tail
Extended Response11 MarksCommunity
(a).
Consider the array implementation of a circular queue illustrated below. Each element in the queue is characterised by both an index and value, indicating the underlying array index and element value respectively.

(i).
By manipulating the circular queue represented above, draw the result of enqueuing letters "C", "A" & "T" (in their provided written order from left to right i.e. x3 separate enqueue operations) followed by one dequeue operation.
[2](ii).
Given an array implementation of the circular queue above, state the condition upon which it would be identified as FULL.
[2](b).
Describe the key functionality of a circular queue.
[3](c).
Compare and contrast circular queues with linear queues.
[4]Hey Siri
Multiple Choice1 MarkPremium
Francisca is integrating voice commands into an existing application. Which one of the following is not an affordance consideration?
(a).
including a list of standard voice commands
(b).
providing appropriate aural signifiers to confirm perceived functionality
(c).
providing appropriate visual signifiers to indicate the presence of voice control
(d).
offsetting development costs elsewhere to ensure the application remains affordable
Gigabit Gallop
Multiple Choice1 MarkPremium
Sergei wants to transfer his completed video project from his desktop to his laptop. The file size is 4 GB.
What is the time difference between copying Sergei’s file using a cable at 5 Gbps and using his wi-fi network at 3.5 Gbps, correct to the nearest second?
(a).
Cable is 3 seconds faster.
(b).
Wi-fi is 6 seconds faster.
(c).
Cable is 3 seconds slower.
(d).
Wi-fi is 9 seconds slower.
Fingerprinting Money
Multiple Choice1 MarkPremium
The designers of a new banking app believe that new clients should not only enter their client number and password but also a verification code, and scan one of their fingerprints to sign into their account. This security measure is best described as
(a).
general authentication
(b).
two-factor authentication
(c).
multi-factor authentication
(d).
single-factor authentication

