Microsoft interview question

Medium problems, could find similar ones on leetcode