Giant
asked

Expert
Abhay Jajodia answered
Hi Giant,
It depends on what the author or course means by space complexity.
Auxiliary space means extra memory the algorithm uses, not counting the input itself.
Space complexity often means total space used, which can include both input space + auxiliary space.
In many algorithm discussions, people focus on auxiliary space because the input size is usually fixed by the problem, and they want to compare how much extra memory different solutions need.
If you have more questions, I am here to help 😊
Python
This question was asked as part of the Complexity Calculation course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer