settle_balances
Simplify balances into the fewest payments so debts are settled, requiring amounts in integer poisha that sum to zero.
Instructions
Simplify any set of balances into the fewest payments.
balances maps each person to what they are owed (+) or owe (-); the values must sum to zero. Money is handled in integer poisha.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| balances | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |