Betsys interview question

How did you solve deadlock?