InterviewDB
Question
Transaction Network: Detect Fraud Cycles and Compute Net Flow Between Accounts in a Payment Graph
Question Details
Problem You have a directed payment network where edge (u, v, amount) means account u sent amount to account v. Implement: net_flow(account) -> int -- return total received minus total sent for an account. detect_cycle() -> list[int] | None -- return…
Full Details
🔒
Unlock full leaked content
Full insider details, leaked discussions, and candidate experiences.
Get Premium →Topics
Coding