Pergunta de entrevista da empresa McKinsey & Company

DSA Medium Question to get Optimal Amount from an array