IGT interview question

2. Technique problem regarding programming