Goldman Sachs interview question

Online test was basic programming