Linear Search (OCR A-Level Computer Science): Quizzes
📚Quizzes
Practise the questions
12 questions from this quiz
ShowHide
Practise the questions
12 questions from this quiz
What does Linear Search return when the target value is found in the list?
What does Linear Search return when the target value is found in the list?
The position of the element
Which types of datasets can Linear Search be applied to?
Which types of datasets can Linear Search be applied to?
Both sorted and unsorted datasets
What is the best case time complexity of Linear Search?
What is the best case time complexity of Linear Search?
What is the worst case time complexity of Linear Search?
What is the worst case time complexity of Linear Search?
What is the space complexity of Linear Search?
What is the space complexity of Linear Search?
What value should Linear Search return when the target is not found?
What value should Linear Search return when the target is not found?
-1
How does Linear Search check elements in a list?
How does Linear Search check elements in a list?
Sequentially, one by one
What is a common mistake when implementing Linear Search?
What is a common mistake when implementing Linear Search?
Using print instead of return
When is Linear Search considered inefficient?
When is Linear Search considered inefficient?
For very large datasets
In the pseudocode, what range does the FOR loop iterate over?
In the pseudocode, what range does the FOR loop iterate over?
0 to array.length - 1
What simplified time complexity is the average case expressed as?
What simplified time complexity is the average case expressed as?
What condition indicates a match has been found in Linear Search?
What condition indicates a match has been found in Linear Search?
array[i] equals the target value
