Booz Allen Hamilton interview question

Typical Java interview question. Data structure.