🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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?

  1. A.It cannot store words longer than 26 letters
  2. B.It stores each word twice
  3. C.It needs a sorted input
  4. 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 →