LinkedIn interview question

Implement put and take in a blocking queue.