← Quiz: Tries (Prefix Trees): all 15 questions
Quiz: Tries (Prefix Trees) · Question 15 of 15
What is the main memory drawback of a trie with a 26-slot array in every node?
What is the main memory drawback of a trie with a 26-slot array in every node?
- A.It cannot store words longer than 26 letters
- B.It stores each word twice
- C.It needs a sorted input
- D.Most slots are empty, so many nodes waste space on unused pointers
Answer & explanation
Correct answer: Most slots are empty, so many nodes waste space on unused pointers
A hash map per node uses less memory when the alphabet is large or the trie is sparse.
Can you get the rest right without peeking?
Take the timed Quiz: Tries (Prefix Trees) quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →