Pregunta de entrevista de WorldQuant

Heap log aggregation question in Python.