Infosys Interview Question

oops basic code array project little ds