J.P. Morgan interview question

Leetcode decode ways problem 91