Google Interview Question

leetcode 140 word break II