Exam-style question
Try this first
Explain why the size of the problem must be considered when comparing two algorithms. Include both time-wise and space-wise efficiency in your answer.
Answer and explanation
Concise answer
The size of the problem affects how the algorithms behave as the amount of data or work increases.
Why this is correct
A comparison based only on one small example may not show the overall efficiency of an algorithm. Considering how time and memory requirements change as the problem size increases gives a more meaningful comparison.
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.
