Skip to content

Glossary: Data Structures and Algorithms in JavaScript

Set

Also written: sets

A hash map with keys and no values, so has, add and delete are O(1) on average. A seen set turns duplicate and pair-sum checks into one O(n) pass.

Where the book teaches it

Related terms

Hash map