SAP interview question

write code to avoid deadlock