Linear search (Edexcel GCSE Computer Science): Quizzes
📚Quizzes
Practise the questions
11 questions from this quiz
ShowHide
Practise the questions
11 questions from this quiz
What type of algorithm is linear search?
What type of algorithm is linear search?
Sequential
What is another name for linear search?
What is another name for linear search?
Brute force algorithm
What does 'brute force' mean in the context of linear search?
What does 'brute force' mean in the context of linear search?
Relies on raw computing power
At which position does linear search begin?
At which position does linear search begin?
Index 0 (first item)
When does a linear search stop?
When does a linear search stop?
Item found or end reached
What is the purpose of the Boolean flag 'found' in the code?
What is the purpose of the Boolean flag 'found' in the code?
Tracks if target is discovered
What keeps the while loop running in linear search?
What keeps the while loop running in linear search?
(not found) AND (index < length)
On what type of lists does linear search work?
On what type of lists does linear search work?
Both sorted and unsorted
What is a disadvantage of linear search for large lists?
What is a disadvantage of linear search for large lists?
Can be very slow
What happens after each comparison in linear search?
What happens after each comparison in linear search?
Index increments by 1
How does linear search check items in a list?
How does linear search check items in a list?
One by one in order
