Intuit interview question

I was given a DSA problem to solve Decode String (LeetCode)