Glossary: Data Structures and Algorithms in C++
Space
Also written: space cost, extra space
The memory an algorithm needs, which Big-O can describe too. has_duplicate uses O(1) extra space, while a copy of the vector would be O(n).
Glossary: Data Structures and Algorithms in C++
Also written: space cost, extra space
The memory an algorithm needs, which Big-O can describe too. has_duplicate uses O(1) extra space, while a copy of the vector would be O(n).