← Reddit Interview Insights

Reddit·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Reddit SWE interview with a billing domain coding problem. The question was more involved than I expected, lots of moving parts with event ordering and status transitions.

Questions Asked (1)

Q1

Given a per-account history of billing events (charges, payments, refunds, adjustments, due dates), implement a system that computes the current billing status for each account. Statuses include things like CURRENT, PAST_DUE_30, PAST_DUE_60, DELINQUENT, and IN_COLLECTIONS, based on rules around time windows, grace periods, and payment ordering. Events must be processed in chronological order, and you should output the final status per account, plus any status transitions.

Algorithms & Data StructuresSystem DesignData Modeling
Author's notes

I underestimated this at first.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the billing rules and status definitions, then design a data model that captures events and account state. Process events chronologically per account, applying rules to update status and record transitions. Finally, discuss scalability and edge cases.

Pro tip: Mention that you would make the rules configurable (e.g., grace periods, thresholds) to accommodate business changes without code changes. Also, highlight the importance of idempotency and handling out-of-order events in a distributed system.

1. Clarify Requirements and Rules

Ask questions to understand the exact status definitions, time windows, grace periods, and payment allocation rules. Confirm expected output format and any constraints.

2. Design Data Model

Define schemas for events (type, amount, timestamp) and account state (current status, last transition). Consider using an event-sourcing approach for auditability.

3. Process Events Chronologically

For each account, sort events by timestamp and process sequentially. Apply business rules to update the account's balance and status, recording transitions.

4. Handle Edge Cases and Scalability

Address scenarios like partial payments, refunds, adjustments, and out-of-order events. Discuss how to scale for many accounts (e.g., batch processing, streaming).

5. Output and Validation

Produce final status per account and list of transitions. Suggest validation steps, such as unit tests for rule scenarios and reconciliation with expected outcomes.

Key Points to Mention

  • Event sourcing and chronological processing to ensure correct state derivation.
  • Configurable business rules (grace periods, thresholds) for maintainability.
  • Payment allocation strategies (e.g., FIFO, oldest debt first) and their impact on status.
  • Idempotency and handling duplicate or out-of-order events.
  • Scalability considerations: batch vs. stream processing, partitioning by account.
  • Auditability: storing transitions for debugging and compliance.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.