Microsoft Interview Question

Standard leetcode like questions, where I had to write code on the whiteboard and explain my logic.