Drivetrain interview question

Leetcode Problem 394 (Decode String)