Pergunta de entrevista da empresa Point72

Standard coding question like leedcode medium level