Code blocks allow many algorithms to be implemented with the following…
2014
Code blocks allow many algorithms to be implemented with the following parameters :
- A.
clarity, elegance, performance
- B.
clarity, elegance, efficiency
- C.
elegance, performance, execution
- D.
execution, clarity, performance
Attempted by 568 students.
Show answer & explanation
Correct answer: B
Answer: clarity, elegance, efficiency
Explanation:
Clarity: Code and algorithms should be easy to read and understand so others can maintain and verify them.
Elegance: A design that solves the problem cleanly and simply, avoiding unnecessary complexity.
Efficiency: The algorithm's use of resources, typically measured in time complexity and space complexity.
Why the other choices are not correct:
The set that uses "performance" instead of "efficiency": "performance" is a general term; in algorithm analysis, "efficiency" (time/space) is the clearer technical term.
Any choice that includes "execution": "Execution" typically refers to running a program and is not an evaluation criterion like clarity, elegance, and efficiency.
Tip: When evaluating or designing algorithms, explicitly consider readability, design quality, and resource usage (time and memory).
A video solution is available for this question — log in and enroll to watch it.