Question 1
Which property must a list have before binary search?
-
Items arranged in sorted order
-
Items arranged in random order
-
Items stored as hexadecimal values
-
Items restricted to unique values
Question 2
At worst, how many checks does a linear search of n items need?
-
\(n\)
-
\(1\)
-
\(\log_2(n)\)
-
\(n/2\)
Question 3
What is the key step in bubble sort?
-
Compare adjacent items and swap those out of order
-
Split the list and merge sorted halves
-
Select the smallest remaining item for the next position
-
Insert each item into a growing sorted section
Question 4
What does insertion sort build over time?
-
A growing sorted section of the list
-
A randomised section to improve speed
-
A stack of unsorted values
-
Two identical copies of the original list
Question 5
What best describes an algorithm?
-
A finite sequence of unambiguous problem-solving steps
-
Source code written in a particular language
-
Input data stored for a program
-
An unordered list of possible ideas
Question 6
Which test data sits at the edge of the valid range?
-
Boundary
-
Normal
-
Erroneous
-
Live
Question 7
Which test data type uses typical valid values?
-
Normal
-
Boundary
-
Erroneous
-
Exhaustive
Question 8
Which test data type deliberately uses invalid input?
-
Erroneous
-
Normal
-
Boundary
-
Expected
Question 9
What is a trace table used for?
-
Tracking variable values as an algorithm runs
-
Showing decisions and processes as symbols
-
Listing test cases and expected results
-
Describing logic without language syntax
Question 10
What is linear search most useful for?
-
Small or unsorted lists
-
Sorted large lists
-
Encrypted lists
-
Lists stored in ROM
Question 11
What is an advantage of merge sort over bubble sort for a large list?
-
It is generally faster
-
It needs less storage
-
It is simpler to code
-
It needs presorted data
Question 12
How does merge sort work?
-
Splits the list, then merges sorted sublists
-
Swaps adjacent out-of-order items
-
Selects the smallest item for each position
-
Inserts each item into a growing sorted section
Question 13
In pseudocode, what does indentation usually show?
-
Block structure
-
Execution speed
-
Data type size
-
CPU frequency
Question 14
In a flowchart, what does a diamond represent?
-
A decision
-
A process step
-
Input/output
-
A subroutine call
Question 15
In a flowchart, what does a terminator represent?
-
Start or end
-
A condition
-
A loop counter
-
A variable assignment
Question 16
What does decomposition mean in algorithm design?
-
Breaking a problem into smaller subproblems
-
Removing detail that does not affect the solution
-
Finding similarities between several problems
-
Combining data into one large structure
Question 17
What does abstraction mean in algorithm design?
-
Removing detail that does not affect the solution
-
Breaking a problem into smaller subproblems
-
Finding similarities between several problems
-
Adding implementation detail before design
Question 18
What is validation in algorithm design?
-
Checking input follows required rules
-
Converting pseudocode to machine code
-
Sorting data into ascending order
-
Encrypting stored passwords
Question 19
What is an advantage of binary search on a large sorted list?
-
It usually needs fewer comparisons
-
It can search unsorted data directly
-
It checks every item in order
-
It sorts the list while searching
Question 20
Which is a disadvantage of merge sort?
-
It needs extra storage while merging
-
It must compare every pair of items
-
It requires presorted data
-
It needs many adjacent swaps
Question 21
At worst, how many passes does a bubble sort of n items need?
-
n − 1
-
1
-
log₂ n
-
n²
Question 22
What is a subroutine?
-
A named block of code that performs a task
-
A variable that stores one value
-
A condition used for selection
-
A loop that repeats instructions
Question 23
What is a dry run?
-
Manually tracing an algorithm with test data
-
Running compiled code on hardware
-
Checking the spelling of source code
-
Writing a test plan
Question 24
Which statement about algorithms is correct?
-
Two algorithms can solve one problem with different efficiency
-
One problem determines one possible algorithm
-
Algorithm efficiency depends only on programming language
-
Changing input size leaves running time unchanged
Question 25
In an algorithm, what is the stage between input and output called?
-
Processing
-
Storage
-
Sorting
-
Testing
Question 26
What does a structure diagram show?
-
How a problem breaks into sub-problems
-
The order instructions run in
-
The values variables hold
-
The route data takes through a network