Infosys Interview Question

To demonstrate the coding skills with a problem (very basic entry level position so not of a difficulty)