Python: In Python, which comparison about Trie / Prefix Tree is accurate?

Difficulty:

Easy

Questions:

1

Time Limit:

2 minutes

Passing Score:

100%

Question

In Python, which comparison about Trie / Prefix Tree is accurate?

  1. A trie is stronger for repeated prefix lookups, while hash tables are stronger for exact-key lookup without structural prefix sharing.
  2. There is no practical difference in behavior, performance, or maintainability when Trie / Prefix Tree is involved.
  3. The oldest option related to Trie / Prefix Tree is always the right production choice regardless of workload or context.
  4. Differences around Trie / Prefix Tree are mostly cosmetic, so correctness and debugging quality do not really change.

Hint

Focus on the behavior or tradeoff, not just the keyword.

Answer and rationale

Correct answer: A. A trie is stronger for repeated prefix lookups, while hash tables are stronger for exact-key lookup without structural prefix sharing.

A trie is stronger for repeated prefix lookups, while hash tables are stronger for exact-key lookup without structural prefix sharing. This is the comparison that usually separates memorization from understanding.

Track: Python