Sollicitatievraag bij Buckhill

Algorithm question, can't remember which one