logo

AQA A-Level Computer Science practice

An algorithm performs a fixed number of instructions, regardless of the size of its input. What is its time complexity?

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

At a glance

MCQ

Type

practice

Style

Topic

Classification of algorithms

Exam-style question

Try this first

An algorithm performs a fixed number of instructions, regardless of the size of its input. What is its time complexity?.

  1. A.O(1)
  2. B.O(log n)
  3. C.O(n)
  4. D.O(2^n)

Answer and explanation

Concise answer

O(1)

Why this is correct

The running time does not grow as the input size n increases, so the algorithm has constant time complexity, written as O(1).

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