Jumio interview question

Word break problem on Leetcode