Goldman Sachs Interview Question

Basically it was from collections and data structure.