Set stores distinct values in first-insertion order. Map stores key-value pairs and replaces a key's value when you set that key again. Both avoid the inherited-key surprises of a plain object used as a dictionary. A WeakMap has a narrower job: its keys are objects, and those keys use identity. Two objects with identical fields are still different keys. WeakMap doesn't expose a list of keys or a size, so don't treat it as an enumerable report table. These exercises use Sets for distinct labels, Maps for lookups and counts, and a WeakMap for instance-specific metadata. Preserve the difference between an absent key and a present empty value.