Google interview question

Optimal data structure for some scenarios