Goldman Sachs interview question

I was asked on Data Structures and Algorithm mainly