Stripe Interview Question

Multi part string manipulation question which was LC med