Apple Interview Question

Here is a code, find bugs in it