Define dp[i] = true if the first i characters of s can be segmented into dictionary words.
For each position i, check all possible last words: if dp[j] is true and s[j:i] is in the dictionary, then dp[i] is true.
Base case: dp[0] = true (empty string is trivially segmentable).
Answer: dp[n].