Goldman Sachs Interview Question

Find the bugs in these code snippets