Google interview question

Medium leetcode question