Domanda di colloquio di Academia.edu

Slight twist on a well known coding problem