Softsquare interview question

String manipulation and Array concept