Space complexity is about calculating the amount of space consumed by algorithm during the course of its execution.There are two types of space complexity, fixed or constant space complexity and linear space complexity.Fixed or constant space complexity refers to cases where the size of space consumed does not increase with the increase of input size.Linear space complexity refers to cases where the space consumed increases with the increase of input size.