Intel Corporation interview question

implement producer consumer problem