Goldman Sachs interview question

3 coding questions were asked