Domanda di colloquio di Stripe

Multi part question on strings, array manipulation which got complex with every subsequent part