Pergunta de entrevista da empresa Block

Implement a particular simple algorithm and then elaborate on it with the interviewer.