Microsoft interview question

1 Leetcode easy, 2 mediums