NerdWallet interview question

CoderPad assessment on a string manipulation problem