Microsoft Interview Question

leetcode easy, basic string manipulation