Pergunta de entrevista da empresa SAP

a Java Code Review and a medium leetcode question