Optimized Search for a Name Across University Databases
viaGlassdoor
Problem: Design an approach to search for a given student's name across the records of all universities in India, and describe how you would optimize the search for speed at scale.
Constraints: Very large dataset (records across many universities); search should be fast for repeated queries.
Approach: A naive linear scan across all records is O(n) per query. Optimize using an inverted index / hash-based lookup keyed by (normalized) name mapping to the set of matching records, giving average O(1) lookup. For fuzzy/partial name matches, a trie or a tokenized search index (Elasticsearch-style) balances flexibility and speed. Sharding/partitioning the index by university or region further improves scalability for very large datasets.
asked …