Infogain interview question

did not cleared the coding round