Domanda di colloquio di Google

Asked to solve a complex algorithm