Mental Model
We build a tree where each path from root to a node forms a word prefix. We find the longest word where every prefix is also a word.
Analogy: Imagine a family tree where each generation adds one letter. We want the longest name where every smaller name before it is also in the family.
root
↓
a -> p -> p -> l -> e
↓
e -> null
Each arrow is a letter link forming words like 'app' and 'apple'.