Mozilla Interview Question

Data structures for different scenarios