FastPrepMinimum Account Settlements
Problems/Minimum Account Settlements

Minimum Account Settlements

Rippling logoRippling● HardFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: This problem is backed by a Rippling phone-screen report. The interview first asked for a valid settlement plan and then asked for the most transaction-efficient plan. The judged function returns the minimum transaction count, which is the stable numeric objective from that follow-up. Estimated match rate: about 90% for the judged task. The report did not provide an exact signature or example.

Each row of transactions is [from, to, amount], meaning from paid amount on behalf of to.

After all original transactions, people may transfer money among themselves to settle every net balance. A person with a negative balance must pay that amount; a person with a positive balance must receive that amount.

Return the minimum number of settlement transactions required to make every net balance zero.

Interviewer follow-ups

The interviewer first asked for any correct set of transfers that settles all accounts, then asked the candidate to minimize the number of settlement transactions.

Function

minimumSettlements(transactions: String[][]) → int

Examples

Example 1

transactions = [["A","B","10"],["B","C","5"]]return = 2

The net balances are A:+10, B:-5, and C:-5. Both B and C must pay A, so two settlements are necessary.

Example 2

transactions = [["A","B","10"],["B","C","10"]]return = 1

B's incoming and outgoing amounts cancel. One transfer from C to A settles everyone.

Constraints

  • 1 <= transactions.length <= 100
  • amount is a positive integer string.
  • At most 12 people have non-zero final balances.

More Rippling Phone Screen questions

  • Filter, Sort, and Deduplicate Scheduled TasksPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Stateful Log Transform and SearchPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Dependency-Aware Task SchedulerPHONE SCREEN · Seen Nov 2026
  • Delivery Cost Tracker with Effective-Dated RatesPHONE SCREEN · Seen Nov 2026
  • Camel CardsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Best and Worst Camel Card CompletionsPHONE SCREEN · Seen Nov 2026
  • Corporate Card Expense RulesOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • In-Memory Priority Task SchedulerPHONE SCREEN · Seen Oct 2026
  • Limit an Organization Tree's HeightPHONE SCREEN · ONSITE INTERVIEW · Seen Oct 2026
  • Median Across N Sorted ArraysPHONE SCREEN · Seen Oct 2026

Similar questions at other companies

  • Optimal Account BalancingPinterest · PHONE SCREEN · ONSITE INTERVIEWPinterest interview questions
  • Word Break IIAmazon · PHONE SCREEN · ONSITE INTERVIEW
  • Optimal Account BalancingSalesforce · PHONE SCREENSalesforce interview questions
  • Word Break IIBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Validate a Mahjong Hand PartitionDuolingo · PHONE SCREENDuolingo interview questions
  • Optimal Account BalancingVirtu Financial · OAVirtu Financial interview questions
  • Sudoku Puzzle SolverConfluent · PHONE SCREEN · ONSITE INTERVIEWConfluent interview questions
  • Max Points on a LineUber · PHONE SCREENUber interview questions
  • Process Shopping Records, Promotions, and Display OrderInstacart · PHONE SCREEN · ONSITE INTERVIEWInstacart interview questions
  • Randomized String MultisetLinkedIn · PHONE SCREENLinkedIn interview questions

Interview reports that mention this question

  • Rippling SDE-1 and SDE-2 Onsites: 14 Experiences (Part 9 of 12)
  • Rippling Full-Time SWE Interviews: 224 Experiences (Part 1 of 12)

Rippling interview experiences

  • Rippling No-Level Older Reports: 31 Experiences (Part 6 of 6)
  • Rippling No-Level Onsite Loops: 24 Experiences (Part 5 of 6)
  • Rippling No-Level Screens and Loops: 18 Experiences (Part 4 of 6)
  • Rippling No-Level Coding Screens: 37 Experiences (Part 3 of 6)
All Rippling interview questionsSee Rippling hiring insights
Saved
class Solution {
    public int minimumSettlements(String[][] transactions) {
      // write your code here
    }

}
Checking account…