Goldman Sachs interview question

Basic hacker rank data structures