Infogain Interview Question

did not cleared the coding round