Back to problems

Design lexicographic range query word store

System Design · Google · Medium

You are asked to design a persistent storage system for a collection of distinct strings. The system must answer range queries of the form: given two strings L and R with L <= R lexicographically, return every stored string w satisfying L <= w <= R, in sorted dictionary order. Describe the on-disk or in-memory layout, the index structure you would use, and the steps taken to execute such a query efficiently. You may also outline how the design handles insertions, deletions,…

Checking your access…