Google interview question

Data structure and algorithms - 2 coding problems