Domanda di colloquio di Microsoft

One of the questions I got was a coding problem that tested both algorithmic thinking and code quality.