Goldman Sachs interview question

Question related to some search / sort algorithm.