Domanda di colloquio di ETS

I was asked to write code to solve a simple numerical problem.