Pergunta de entrevista da empresa Datadog

The technical question asked me to implement a simple multiple-producer single-consumer event queue, merging events coming from different sources. I was asked to handle various edge cases, and we discussed the computational complexity of the algorithms I used extensively. We used JavaScript, but I was told that any language I was familiar with would be fine.