Infosys Interview Question

Pattern question