← Whiteboard questions

Pattern

Arrays & Hashing

Reach for a hash table when a problem asks whether you have seen something before, or how often. You trade a little memory for a lookup that takes one step instead of a scan. Most of these run in O(n) time with O(n) memory.

Arrays & Hashing interview questions and solutions