Glossary term
What is space complexity? Meaning for developers
How much extra memory an algorithm needs as the input grows (the input itself is not counted). A Set of every value is O(n). A few variables is O(1).
Learn it properly · DSALesson 12: Big-O: Counting the StepsHow many times does the loop run? Reading time and space complexity from code, and from the constraints of a problem.