SAP interview question

LeetCode question (I think it was a leetcode medium)