Question
Which statement about Trie and Prefix Tree is the strongest interview answer?
- Trie and Prefix Tree is mostly a naming style choice and has little effect on runtime or design.
- Trie and Prefix Tree exists mainly to reduce the number of Java files in a project.
- A trie stores strings by shared prefixes so common beginnings reuse the same path.
- Trie and Prefix Tree matters only for frontend frameworks, not for core Java applications.
Hint
Start with the core rule behind Trie and Prefix Tree.
Answer and rationale
Correct answer: C. A trie stores strings by shared prefixes so common beginnings reuse the same path.
A trie stores strings by shared prefixes so common beginnings reuse the same path. This is the base concept interviewers commonly test first.
Track: Java