Pergunta de entrevista da empresa Optiver

A coding question that you need to pass the cases.