Deadlock detector (wait-for graph) — Backend Interview Challenge | Mentoxis