Splitwise / Settle Group Balances

Asked at Pinterest · Coding Questions · Difficulty: Medium · Last asked Jun 10, 2026

Group of friends takes a trip; each person has paid an arbitrary subset of the bills. Output any valid sequence of paybacks `(from, to, amount)` that zeros every person's net balance. The minimum-number-of-transactions variant is the bonus follow-up, not the base ask.

Loading the problem…