Mark As Completed Discussion

In this tutorial, we will introduce the concept of space complexity. In simple words, it is the amount of memory required to run a program, proportional to the input size that's fed in. For computing the space complexity, we ought to consider two factors:

  1. Input space: Space used by input.
  2. Auxiliary space: The additional space used by the algorithm, e.g., to hold temporary variables or the space used by the activation stack.