Citi Interview Question

Consumer/Producer Problem