Solving the coding problem: Word Break (Leetcode 139)
3 min readSep 18, 2020
Problem
Given a non-empty string S and a dictionary wordDict containing a list of non-empty words, determine if S can be segmented into a space-separated sequence of one or more dictionary words.
Note:
- The same word in the dictionary may be reused multiple times in the segmentation.
- You may assume the dictionary does not contain duplicate words.