🎙 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 10 of 15

Ten words share the prefix "inter". How many times are the letters i-n-t-e-r stored in the trie?

Ten words share the prefix "inter". How many times are the letters i-n-t-e-r stored in the trie?

  1. A.10 times
  2. B.Once
  3. C.5 times
  4. D.Twice
Answer & explanation

Correct answer: Once

Words with a common prefix share the same path of nodes; that is where the memory saving comes from.

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 →