Microsoft Interview Question

Classic easy leetcode string question