Amazon Interview Question

Hashing question mixed with OOP!