Glossary: Data Structures and Algorithms in Java
space cost
Also written: extra space, space
The memory code uses, which Big-O describes too. `hasDuplicate` with an array is O(1) extra space, while a copy of the array is O(n).
Glossary: Data Structures and Algorithms in Java
Also written: extra space, space
The memory code uses, which Big-O describes too. `hasDuplicate` with an array is O(1) extra space, while a copy of the array is O(n).