Google interview question

General DS&A, Medium and Hard Leetcode