Xplor Technologies interview question

String manipulation problem in any language