Amazon Interview Question

Question about locks.