logo

AQA A-Level Computer Science practice

Algorithm A takes a number of steps represented by 3n + 2, while Algorithm B takes a number of steps represented by n², where n is the problem size. Which conclusion is most appropriate for large problem sizes?

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

Algorithm A takes a number of steps represented by 3n + 2, while Algorithm B takes a number of steps represented by n², where n is the problem size. Which conclusion is most appropriate for large problem sizes?.

  1. A.Algorithm B is generally more time-efficient because n² grows more slowly than 3n + 2
  2. B.Algorithm A is generally more time-efficient because 3n + 2 grows more slowly than n²
  3. C.Both algorithms must always take exactly the same time
  4. D.The problem size has no effect on the comparison

Answer and explanation

Concise answer

Algorithm A is generally more time-efficient because 3n + 2 grows more slowly than n²

Why this is correct

The expressions describe how the number of steps changes as the problem size increases. For large values of n, n² grows faster than 3n + 2, so Algorithm A is generally more time-efficient.

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