Skip to content

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).

Where the book teaches it

Related terms

Big-O notationin place