PracHub
QuestionsPremiumCoachesLearningGuidesInterview Prep
|Home/Coding & Algorithms/Pinterest

Compute minimal transactions to settle debts

Last updated: Mar 29, 2026

Quick Overview

This question evaluates a candidate's algorithm design and combinatorial optimization skills, focusing on reasoning about net balance consolidation, transaction minimization, and complexity analysis.

  • Medium
  • Pinterest
  • Coding & Algorithms
  • Software Engineer

Compute minimal transactions to settle debts

Company: Pinterest

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Onsite

You are given a list of transactions (payer, payee, amount) among a set of people. Compute a sequence of transfers that settles all net balances using the minimum number of transactions; return any optimal solution. Amounts are integers; there can be up to 20 distinct people. Describe your algorithm, complexity, and how you would handle multiple optimal answers and large intermediate balances.

Quick Answer: This question evaluates a candidate's algorithm design and combinatorial optimization skills, focusing on reasoning about net balance consolidation, transaction minimization, and complexity analysis.

Related Interview Questions

  • Maximize Boxes Stored Through One Entrance - Pinterest (medium)
  • Solve Multiple Coding Interview Problems - Pinterest (medium)
  • Implement a Sparse Matrix Class - Pinterest (medium)
  • Assign Pins to Shortest Columns - Pinterest (medium)
  • Design Hierarchical Permission Checks - Pinterest (medium)
Pinterest logo
Pinterest
Sep 6, 2025, 12:00 AM
Software Engineer
Onsite
Coding & Algorithms
9
0

You are given a list of transactions (payer, payee, amount) among a set of people. Compute a sequence of transfers that settles all net balances using the minimum number of transactions; return any optimal solution. Amounts are integers; there can be up to 20 distinct people. Describe your algorithm, complexity, and how you would handle multiple optimal answers and large intermediate balances.

Submit Your Answer

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Pinterest•More Software Engineer•Pinterest Software Engineer•Pinterest Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 8,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.