Mental Model
We want to check if a long word can be split into smaller valid words from a dictionary. We try breaking it step by step and remember what parts can form valid words.
Analogy: Imagine you have a long sentence without spaces, and you want to find where to put spaces so every word is in your dictionary. You try cutting the sentence at different points and check if the pieces are real words.
s: "leetcode" Dictionary: ["leet", "code"] Initial: "leetcode" Try splits: "leet" | "code" If both parts are in dictionary or can be split further, answer is yes.
