Infosys Interview Question

It was all very easy.