Pregunta de entrevista de McKinsey & Company

DSA Medium Question to get Optimal Amount from an array