SAP interview question

a Java Code Review and a medium leetcode question