PayPal interview question

Producer Consumer Problem