Goldman Sachs Interview Question

Algorithms and data structures. They will follow up about time/space complexity