Google interview question

Leetcode medium difficulty coding questions