Select the accurate description of Space complexity.
- A. An ordering of vertices in a directed acyclic graph such that for every edge, the source vertex comes before the destination vertex.
- B. A measure of the amount of memory an algorithm uses as a function of input size. ✓
- C. An algorithm that uses a degree of randomness as part of its logic to achieve good average-case performance.
- D. A greedy algorithm that finds a minimum spanning tree for a connected, weighted graph by adding edges in increasing order of weight.
Correct answer
B. A measure of the amount of memory an algorithm uses as a function of input size.
Explanation
Space complexity refers to a measure of the amount of memory an algorithm uses as a function of input size.