logo

AQA A-Level Computer Science practice

What does a linear search do when searching a list for a target value?

Try the question first, then check the answer and practise the same topic again.

At a glance

MCQ

Type

practice

Style

Topic

Searching algorithms

Exam-style question

Try this first

What does a linear search do when searching a list for a target value?.

  1. A.It checks items one at a time from the beginning until the target is found or the list ends.
  2. B.It repeatedly checks the middle item and discards half of the list.
  3. C.It sorts the list before checking every item.
  4. D.It compares only the first and last items.

Answer and explanation

Concise answer

It checks items one at a time from the beginning until the target is found or the list ends.

Why this is correct

A linear search examines list elements sequentially, starting at the first element. It stops when the target is found or when every element has been checked.

Use the concise answer above for a quick check, then reveal the full model answer and detailed explanation.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions