Solution Street Interview Question

Coding exercise was a simple data structure problem