Fewest Collection Call Days Covering Every Borrower's Window

Last updated: November 29, 2026

Quick Overview

Each delinquent borrower has an inclusive day range during which the servicing team is permitted and likely to reach them. Choose the fewest call days such that every borrower's range contains at least one chosen day, and return those days.

Upstart
Coding & Algorithms
Software Engineer
Upstart
November 29, 2026
Software Engineer
Technical Screen
Coding & Algorithms
Medium

0

0

0 solved


Each delinquent borrower has an inclusive day range during which the servicing team is permitted and likely to reach them. Choose the fewest call days such that every borrower's range contains at least one chosen day, and return those days.

Upstart services its own loans, and collections outreach is constrained by borrower preferences and contact-frequency rules, so batching outreach days is a natural scheduling problem. The interviewer is looking for the interval stabbing greedy and a crisp exchange argument for why it is optimal.

What the Interviewer Expects
  • Sort windows by end day
  • Choose the end of the first uncovered window
  • Skip windows already containing the last chosen day
  • Prove optimality with an exchange argument
  • Verify against brute force or small cases
Key Topics to Cover
greedy
intervals
interval stabbing
scheduling
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
  • Each day can handle at most C calls. Does greedy still work?
  • Some borrowers carry more weight (larger balances). How would you prioritize?
  • How would you incorporate regulatory limits such as no more than seven contact attempts in seven days?
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

Windows are inclusive integer day ranges with start <= end. Output a sorted list of chosen days of minimum size. Empty input returns an empty list....

High-Level Design

Process windows in order of their end day. If the most recently chosen day already lies in the current window, the window is covered. Otherwise choose the window's end day. Choosing as late as possibl...


Submit Your Answer
Markdown supported

Related Questions