Google interview question

Given Leetcode style coding challenges, medium to hard.