Intel Corporation interview question

How would you solve a following code.