Infosys Sample Coding Question