logo

Question detail

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, check the answer, then read the explanation to understand the curriculum point.

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

Model answer

What a good answer should say

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

Explanation

Why this works

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.

Common mistake

No common mistake is linked to this question yet.

Related flashcards

No flashcards are published for this page yet.

Related practice questions

No questions are published for this page yet.