Choose the correct description of Amortized analysis.
- A. A comparison-based sorting algorithm that uses a binary heap data structure to sort elements.
- B. An optimization technique that stores the results of expensive function calls to avoid recomputing them.
- C. A measure of the amount of memory an algorithm uses as a function of input size.
- D. A method of analyzing algorithms that determines the average time or space cost over a sequence of operations. ✓
Correct answer
D. A method of analyzing algorithms that determines the average time or space cost over a sequence of operations.
Explanation
Amortized analysis refers to a method of analyzing algorithms that determines the average time or space cost over a sequence of operations.