Meta interview question

LeetCode medium and hard questions.