Yahoo Interview Question

how to implement a thread safe data structure