All challenges
Code AnalysisIntermediate 60s

Unbounded in-memory queue

What is the operational failure mode of this producer/consumer?
Starter code
q = deque()
def produce(m): q.append(m)          # fast
def consume():
    while True:
        process(q.popleft())         # slow

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle