Andersen Lab interview question

Algorithms and data structures. Many questions regarding data queries optimisations