Exam-style question
Try this first
What does it mean for one algorithm to be more time-efficient than another?.
- A.It uses less memory for every possible problem
- B.It takes less time to complete for the relevant problem sizes
- C.It always produces a different result
- D.It contains fewer lines of code
Model answer
What a good answer should say
- It takes less time to complete for the relevant problem sizes
Explanation
Why this works
Time efficiency concerns how quickly an algorithm runs. The number of lines of code does not by itself determine how time-efficient an algorithm is.
Common mistake
No common mistake is linked to this question yet.
