BMW Group interview question

String manupulation