Pergunta de entrevista da empresa Google

A deep software question about implementation of a basic loop structure.