Intuit interview question

Standard question around string manipulation