Google interview question

Process simulation based on data structure