Wipro NTH Coding Question- 37