Settle Shared-Expense Debts, Then Reduce the Number of Payments
Company: Pinterest
Role: Data Engineer
Category: Software Engineering Fundamentals
Difficulty: medium
Interview Round: Technical Screen
Overview: A coding question about settling shared expenses: turn a list of debts between people into payments that leave everyone even, first with no limit on the number of payments and then with as few payments as possible. It tests net-balance reasoning, matching payers with receivers, heap usage, and judging whether a greedy settlement is truly minimal.
Read the full Pinterest Data Engineer interview experience this question came from