Google Interview Question

normal for round one, a Iteration Function code question for R2