Domanda di colloquio di Thought Machine

to answer an algorithm question