Domanda di colloquio di Affinity

It was a while ago so I do not remember, but it was a basic algorithms question.