Microsoft Interview Question

last question stated in the above questions is somewhat difficult