S&P Global Interview Question

about dsa easy questions from leetcode