Infosys Interview Question

logical reasoning