Glossary: Data Structures and Algorithms in JavaScript
Space
Also written: space cost, space complexity, extra space
The memory an algorithm needs, which Big-O also describes. A copy of the list is O(n) space, while a few variables are O(1).
Glossary: Data Structures and Algorithms in JavaScript
Also written: space cost, space complexity, extra space
The memory an algorithm needs, which Big-O also describes. A copy of the list is O(n) space, while a few variables are O(1).