GlobalLogic Interview Question

write a program for deadlock