Glossary: Coding Interviews in C++
Trading space for time
Also written: trade space for time
Using extra memory, such as a hash set of what you have seen, to make a solution faster. It turns O(n²) into O(n).
Glossary: Coding Interviews in C++
Also written: trade space for time
Using extra memory, such as a hash set of what you have seen, to make a solution faster. It turns O(n²) into O(n).