Pergunta de entrevista da empresa Jane Street

array problem about efficient scheduling