Stripe interview question

Multi part string manipulation question which was LC med