Uber interview question

Standard coding challenge on string manipulation.