Domanda di colloquio di Google

Simple starter but increases difficulty in improving an algorithm