Goldman Sachs interview question

Find the bugs in these code snippets