Apple Interview Question

solve a riddle