GlobalLogic interview question

write a program for deadlock