Backend Engineer
Both transactions are waiting for each other.
- 1Your approach
- 2The follow-up
- 3Reflect & learn
THE INTERVIEWER ASKS
The scenario
Two transfers update the same pair of accounts in opposite orders. Explain how a deadlock can occur and how to handle it.
How would you approach it?
Explain your assumptions, your approach, and why you chose it.