S&P Global interview question

about dsa easy questions from leetcode