Microsoft Interview Question

Producer Consumer problem