Wipro NTH Coding Question- 24