Google interview question

Leetcode questions. Just study that.