Pergunta de entrevista da empresa Bank of America

Write code for deadlock?