Google interview question

two rounds of data structure and algorithms