Frage im Vorstellungsgespräch bei Goldman Sachs

Two rather easy Coderpad problems, then an option for a third problem.