
Writing
Custom Data Structure: A One-to-Many Mapping
A one-to-many map must enforce unique values and return a key from a value. Shared tests and four implementations show how correctness shapes a benchmark.

Topic
Associating one key with multiple values while defining which keys each value may belong to. Lookup direction, uniqueness constraints and update rules determine the relationship's contract and storage.
1 page

Writing
A one-to-many map must enforce unique values and return a key from a value. Shared tests and four implementations show how correctness shapes a benchmark.