← Questions

Store words for lexicographic range queries

0
GoogleSystem designLast asked Oct 2025

Design storage for a set of words that returns every word in a lexicographic range [low, high]. For the words aa, aaa, ac, f, z, the range [a, b] gives aa, aaa, ac and [ab, b] gives ac. Discuss sorted structures (balanced trees, tries, B-trees, sorted files), inserts, and how it scales beyond one machine.

Your canvas
Draw your answer hereBoxes, arrows and notes, saved for you to come back to.Sign in to start drawing