Search
⌘K

Leetcode 465. Optimal Account Balancing

Given a list of money transfers among people, compute the minimum number of transactions required to settle all debts so every person's net balance becomes zero. After aggregating net balances, the core challenge is to cancel out positive and negative balances optimally—typically solved with backtracking/bitmask DP and aggressive pruning to find the fewest transactions.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.