Domanda di colloquio di Intel Corporation

How would you solve a following code.