Exam-style question
Try this first
When comparing the time efficiency of two algorithms, which factor is most important to consider?.
- A.The colour used in the program interface
- B.The size of the problem being solved
- C.The name of the programming language only
- D.The number of comments in the code
Answer and explanation
Concise answer
The size of the problem being solved
Why this is correct
Algorithm complexity is expressed as a function relative to the size of the problem. The size of the input or problem is therefore a key issue when comparing algorithms.
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.
