Microsoft interview question

Medium leetcode problem and Debug an existing application problem