Pergunta de entrevista da empresa CME Group

data structure question - didn't specify time limit but i ended up going for an hour