algorithm: publisher-consumer-problem: adding code for publisher consumer problem