FastPrepSchedule Invoice Emails and Delinquencies
Problems/Schedule Invoice Emails and Delinquencies

Schedule Invoice Emails and Delinquencies

Stripe logoStripe● MediumNEW GRADINTERNONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Stripe new-grad onsite interview. The source gives a reminder schedule you can set, sorted email output, what happens on a partial payment, cancelling after a full payment, and a report on late payers. It does not give the order for equal times or how the function input is written. Our version is about 96% the same as the reported question.

You are given a configurable invoice-email schedule, one invoice per customer, and an unsorted list of customer payments.

  • Each schedule row is offset,title. The offset is relative to the invoice time.
  • Each invoice row is invoiceTime,name,amount.
  • Each payment row is paymentTime,name,amount.

For every scheduled email time, first apply all payments made at or before that time. Send the email only when the customer still owes a positive amount. Format it as time: [title] Invoice for name for amount dollars.

The greatest schedule offset is the due-date offset. After all email lines, append Delinquent customers:, followed by one line name owes amount dollars for every invoice with a positive balance at its due time.

Sort email events by time, then invoice input position, then schedule input position. List delinquent customers in invoice input order.

Function

scheduleInvoiceEmails(schedule: String[], invoices: String[], payments: String[]) → String[]

Examples

Example 1

schedule = ["-10,Upcoming","0,New","20,Reminder","30,Due"]invoices = ["0,Alice,200","1,Bob,100"]payments = ["-9,Alice,100","1,Alice,50","0,Bob,100"]return = ["-10: [Upcoming] Invoice for Alice for 200 dollars","-9: [Upcoming] Invoice for Bob for 100 dollars","0: [New] Invoice for Alice for 100 dollars","20: [Reminder] Invoice for Alice for 50 dollars","30: [Due] Invoice for Alice for 50 dollars","Delinquent customers:","Alice owes 50 dollars"]

Payments reduce the amount shown by later emails. Bob pays in full before his new-invoice email, so all later Bob emails are skipped. Alice still owes 50 at the due time.

Example 2

schedule = ["-5,Upcoming","0,Due"]invoices = ["10,Cara,50"]payments = ["5,Cara,50"]return = ["Delinquent customers:"]

The payment occurs at the first scheduled email time and is applied first, so no email is sent and Cara is not delinquent.

Example 3

schedule = ["0,New","10,Due"]invoices = ["0,Ada,40","0,Bea,30"]payments = []return = ["0: [New] Invoice for Ada for 40 dollars","0: [New] Invoice for Bea for 30 dollars","10: [Due] Invoice for Ada for 40 dollars","10: [Due] Invoice for Bea for 30 dollars","Delinquent customers:","Ada owes 40 dollars","Bea owes 30 dollars"]

Equal-time emails preserve invoice input order. Neither customer pays, so both appear in the delinquency section.

Constraints

  • 1 <= schedule.length <= 20; offsets are unique integers in strictly increasing order.
  • 1 <= invoices.length <= 1000; customer names are unique.
  • 0 <= payments.length <= 10000; every payment names a known customer.
  • Invoice amounts and payment amounts are positive integers at most 10^9.
  • Times and offsets fit in signed 32-bit integers, and their sums fit in signed 64-bit integers.
  • Payments at an email timestamp are applied before that email. Payments beyond the due time do not affect delinquency.

More Stripe Onsite Interview questions

  • Parse Boolean Rule ExpressionsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Render a Task Tree from CSV RowsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Invoice / Payment ReconciliationPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Transaction Rule Expression EvaluatorONSITE INTERVIEW · Seen Oct 2026
  • Evaluate Ordered Action RulesPHONE SCREEN · ONSITE INTERVIEW · Seen Sep 2026
  • WebSocket Load Balancer — Parts 1–5OA · ONSITE INTERVIEW · Seen Sep 2026
  • Rule-Driven Transaction Fraud DetectionPHONE SCREEN · ONSITE INTERVIEW · Seen Jul 2026
  • Account Balance Manager Part 3 - Platform CoverageONSITE INTERVIEW · Seen May 2026
  • Account Balance Manager Part 2 - Reject OverdraftsONSITE INTERVIEW · Seen May 2026
  • Account Balance Manager Part 1 - Calculate TotalsONSITE INTERVIEW · Seen May 2026

Similar questions at other companies

  • Read a File from Distributed ChunksHudson River Trading · ONSITE INTERVIEWHudson River Trading interview questions
  • P&L Leaderboard OperationsBloomberg LP · ONSITE INTERVIEWBloomberg LP interview questions
  • Pins Violation Log QueriesPinterest · PHONE SCREENPinterest interview questions
  • Resource Reconciler: Plan and Apply CreatesPerplexity AI · PHONE SCREENPerplexity AI interview questions
  • HTTP Request RedirectionAmazon · OA
  • Aggregate Paginated Project Run RecordsReplit · OA
  • Credit Card Command ProcessorChime · PHONE SCREEN
  • Parcel Attribute Store with TTLAirbnb · OAAirbnb interview questions
  • Popular and Instant-Runoff Election WinnersCoursera · PHONE SCREEN
  • AI Role: Collection with Add and Remove OperationsApple · PHONE SCREENApple interview questions

Interview reports that mention this question

  • Stripe SWE Intern Onsite Interview Questions: 1 Experience
  • Stripe Internship Invoicer and Bikemap Onsite
  • Stripe SWE Intern Invoice and Integration Onsite: 1 Experience
  • Stripe New Grad Interview Question Bank: 47 Problems

Stripe interview experiences

  • Stripe New Grad SWE OA and Phone Screen: 2 Experiences
  • Stripe Experienced SWE OA and Onsite Questions: 3 Experiences
All Stripe interview questionsSee Stripe hiring insights
Saved
class Solution {
    public String[] scheduleInvoiceEmails(String[] schedule, String[] invoices, String[] payments) {
      // write your code here
    }
}
Checking account…