Glossary: Data Structures and Algorithms in JavaScript
Index (lookup Map)
Also written: index, build an index
A Map built once from a list, keyed by a field such as a SKU, so each later lookup is O(1) instead of a loop that is O(n).
Glossary: Data Structures and Algorithms in JavaScript
Also written: index, build an index
A Map built once from a list, keyed by a field such as a SKU, so each later lookup is O(1) instead of a loop that is O(n).