Goldman Sachs interview question

Easy qns for first round, medium for second