Compute Days Past Due and Delinquency Bucket From Payment History

Last updated: November 29, 2026

Quick Overview

Given a loan's installment schedule and the customer's payments, determine as of any date how many days past due the account is (measured from the oldest installment not fully paid) and map it to a delinquency bucket such as Current, 1-29, 30-59, 60-89 or 90+.

OneMain Financial
Coding & Algorithms
Software Engineer
OneMain Financial
November 29, 2026
Software Engineer
Online Assessment
Coding & Algorithms
Medium

0

0

0 solved


Given a loan's installment schedule and the customer's payments, determine as of any date how many days past due the account is (measured from the oldest installment not fully paid) and map it to a delinquency bucket such as Current, 1-29, 30-59, 60-89 or 90+.

Delinquency status drives collections queues, credit bureau reporting and charge-off timing at a lender like OneMain, so engineers on servicing and data teams need to compute it correctly. The interviewer wants to see you apply payments oldest-installment-first, ignore payments after the as-of date, and treat partial payments correctly.

What the Interviewer Expects
  • Apply payments to installments in due-date order (oldest first)
  • Only count payments made on or before the as-of date
  • Measure DPD from the due date of the oldest installment with a remaining balance
  • Return 0 when nothing currently due is unpaid, including prepaid accounts
  • Keep bucket boundaries in data so they can change without code edits
Key Topics to Cover
delinquency
FIFO allocation
date arithmetic
collections
credit reporting
How to Approach This
  1. Clarify input constraints and edge cases before writing code.
  2. Walk through your approach verbally and confirm with the interviewer before coding.
  3. Start with a brute force solution, then optimize. Mention time and space complexity.
  4. Test your solution with examples, including edge cases like empty input or duplicates.
  5. Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
  • How would you compute the DPD time series for every month-end across 2 million loans efficiently?
  • Some lenders consider an account current if at least 90% of the installment was paid. How would you add a tolerance threshold?
  • How do payment deferrals or extensions granted by a branch change the schedule this logic reads?
  • How would you use this output to build a roll-rate report?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice DSA Problems
Sample Answer
Requirements

Inputs: a schedule of (due_date, amount_cents), payments of (date, cents), and an as_of date. Output: integer days past due and its bucket. An installment due on the as-of date is not yet late. Amount...

High-Level Design

Keep an array of remaining amounts per installment. Walk payments in date order up to as_of and drain installments from the oldest. Afterwards, find the first installment with a remaining balance. If ...


Submit Your Answer
Markdown supported

Related Questions