Google interview question

Data structure related