Amazon Interview Question

the data structure you use in your code