Yahoo interview question

Write code to show producer/consumer problem