Microsoft interview question

Leetcode style questions - 2 problems - 120 minutes