Goldman Sachs interview question

Technical challenge requiring knowledge of algorithms.