Infosys Interview Question

Technically mostly and more logical