Wipro NTH Coding Question- 38