logo

AQA A-Level Computer Science practice

A recursive algorithm makes two recursive calls for every input element and continues until all elements have been processed. Which complexity is the most appropriate general classification?

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

A recursive algorithm makes two recursive calls for every input element and continues until all elements have been processed. Which complexity is the most appropriate general classification?.

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

Answer and explanation

Concise answer

O(2^n)

Why this is correct

When the number of calls branches into two calls at each level, the number of calls can grow exponentially with n. This is represented by O(2^n).

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