Google interview question

Leetcode Data structures and algorithms quedtions