Wipro Interview Question

String based coding question