InterviewDB Experience

Transaction Settlement Engine - Coding Interview

Interview Experience

Problem You are given a list of bilateral transactions between parties: each entry is (payer, payee, amount). Simplify the settlement so the total number of transfers is minimized while each party ends up with the same net balance. Example: Constraints: amounts are positive integers; up to 20 parties. Approach Compute net balance per party. Separate into creditors (positive) and debtors (negative). Greedily match the largest debtor with the largest creditor, emit a transfer, reduce both, and rep…

Full Details

🔒

Unlock all Affirm questions

Full insider details, leaked discussions, and candidate experiences.

Get full access — $100 a year, unlimited access

About This Question

This is a candidate experience report from a affirm interview during the phone round.

It covers the following topics: Coding, Greedy, Phone, Onsite .