Infosys Interview Question

Very tough one couldn't response well