Skip to content

Glossary: Coding Interviews in Go

Hash map lookup and counting

Also written: hash map, map, pattern 1, set

Using a map to remember what you've seen or to count items, in O(1) per lookup on average. Go has no set type, so a set is a `map[T]struct{}`.

Where the book teaches it

Related terms

Trading space for timestruct{}