Microsoft Interview Question

Look at leetcode