Skip to content

Glossary: Coding Interviews in JavaScript

Trading space for time

Also written: trade space for time

Using extra memory, such as a Set or Map, to make a solution faster. A Set makes each lookup O(1) at the cost of O(n) space.

Where the book teaches it

Related terms

BottleneckHash map lookup and counting