Which of the following statements is TRUE about the space complexity of an…

2024

Which of the following statements is TRUE about the space complexity of an algorithm ?

  1. A.

    It always dominates the time complexity.

  2. B.

    It represents the additional memory used by the algorithm.

  3. C.

    It is always independent of the input size.

  4. D.

    Both (A) and (B) are true.

Attempted by 200 students.

Show answer & explanation

Correct answer: B

Space complexity refers to the total amount of memory space required by an algorithm during its execution. It includes both fixed space (independent of input size) and variable space (dependent on input size). Option B correctly identifies this definition, while other options confuse it with time complexity or provide incomplete definitions.

Explore the full course: Tpsc Assistant Technical Officer