Blocking Queue (Producer-Consumer)
Design a bounded blocking queue that blocks the calling thread on enqueue when the queue is full and on dequeue when empty, supporting multiple concurrent producers and consumers.
Enable JavaScript for the full StreamPrep guide.