Microsoft Interview Question

How to implement a DB index for a string field How to implement a DB index for a numeric range (e.g give me all rows with age > 10 and <50 and describe the algorithm to get those rows (including o notation) How to implement an index combining both string field and numeric range

Interview Answer

Anonymous

Feb 3, 2021

1. map between a value and the rows that has that value 2. binary tree 3. binary tree where each node holds a map