Appcues interview question

Leetcode style questions about string manipulation