Frage im Vorstellungsgespräch bei Google

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