Goldman Sachs Interview Question

I was asked on Data Structures and Algorithm mainly