GlobalLogic Interview Question

write a program of producer consumer without using concurrency