Domanda di colloquio di Buckhill

Algorithm question, can't remember which one