Affirm Coding Interview Questions
18 coding questions reported by candidates who interviewed at Affirm, out of 21 Affirm questions we track. They average 2.9/5 difficulty (medium). Most common topics: SWE, Medium Difficulty, Hashmap, Payment. 14 were reported asked within the last year, most recently in July 2026.
Practice Affirm questions →Difficulty
- 2/5 — easy2
- 3/5 — medium15
- 4/5 — hard1
Asked for SWE (18), DataEng (3), MLE (2)
Reported Affirm coding questions
Transaction Balance & Minimum Settlement
3/5This reported interview question from Affirm challenges candidates to tackle a two-phase financial computation problem. First, you must calculate end-of-day financial standings for various participants based on chronological transaction logs. Second, you are asked to resolve outstanding debts across the network using the fewest possible transactions, commonly known as a minimum cash flow or debt settlement algorithm. This exercise tests your proficiency with greedy strategies and priority queues for efficient optimization. To explore the complete problem statement, optimal algorithms, and fully tested code solutions, a subscription is required.
asked July 2026SWEGreedyHeapProcess time-bounded offers and user redemption limits from CSV events
3/5Affirm coding question on event processing with time windows: offers have validity periods and per-user redemption caps, and you decide which offers each user can still claim at a given moment. It tests careful CSV parsing, inclusive interval checks and per-user state tracking. A subscription unlocks the full statement and the reference solution.
asked July 2026AffirmDesign a Dictionary with Random Value Retrieval
3/5This algorithm design challenge, frequently encountered in interviews at Affirm, requires you to build a custom dictionary data structure that supports efficient insertion, deletion, lookup, and weighted random value retrieval. You must ensure that extracting a random value respects the frequency distribution of stored elements rather than treating every unique entry with equal probability. The task tests your mastery of combining hash maps and linear data structures to achieve optimal time complexities for all required methods. Unlock the complete problem specifications and the optimal solution with a subscription.
asked July 2026AffirmData Processing with Schema and Labels
2/5Presented during software engineering evaluations at Affirm, this coding task requires applicants to merge structured datasets with external identifier mappings and metadata schemas using low-level programming constructs. The challenge tests your data manipulation proficiency, array handling, and ability to strictly adhere to formatting constraints without relying on external analytical libraries. It is designed to verify foundational coding hygiene and transformation logic. Access to the full exercise requirements and optimal solution code requires a paid subscription.
asked July 2026AffirmFraud Detection: Debug + Match Transactions to Fraud Events + List All Fraud
3/5An Affirm coding question in three parts: repair a faulty implementation, group transactions under the fraud cases they belong to, and report every fraudulent transaction. It tests debugging discipline, hash-map grouping and attention to Python pitfalls.
asked July 2026AffirmDetermine Topmost Parent Company for Loan Processing
3/5Featured as a practical coding question in Affirm recruitment sessions, this task requires you to traverse hierarchical enterprise networks to identify ultimate corporate ownership structures for financial risk assessment. Given various parent-child affiliations alongside client loan records, your goal is to trace upward through corporate tiers to isolate the topmost umbrella entity for every transaction. This exercise evaluates graph traversal techniques, hash map utilization, and recursive relationship resolution. Review the full problem text and efficient reference solution by acquiring a subscription.
asked July 2026AffirmFraud Detection: Debug + Event Matching
3/5Prepare for your upcoming Affirm interview with this practical coding challenge focused on fraud detection and event management. Candidates are tested on their ability to troubleshoot existing codebases and efficiently categorize transaction records based on predefined security rules and event types. This task evaluates your fluency with data structures like hash maps and your proficiency in writing clean, reliable payment processing logic under time constraints. Unlock the complete problem statement, underlying architectural patterns, and expert model solution by securing a paid subscription.
asked May 2026SWEHashmapPaymentPromotion Offer Redemption Tracking
3/5Navigate complex data processing and bookkeeping logic often encountered during interviews at Affirm. This challenge requires simulating a real-time event pipeline that evaluates promotional validity windows and enforces user-specific usage limits against incoming redemption transactions. It tests your proficiency in designing robust data structures for state tracking and efficient data ingestion. View the complete problem breakdown, optimal architectural patterns, and verified source code by securing a paid subscription.
asked May 2026SWEHashmapPaymentEnd-of-day balances + minimize settlement transactions to zero out balances
4/5This algorithmic challenge, featured in technical assessments at Affirm, involves processing a chronological stream of monetary ledger events to compute final financial standings before determining the absolute minimum number of cross-account transfers needed to zero out all net balances. It tests proficiency in aggregation logic, graph-based debt simplification, and efficient data structuring. Unlock full access to the complete problem breakdown and optimal code implementation with a paid subscription.
asked April 2026AffirmLoan Aggregation & Transaction Matching (Parent-Company Resolution)
3/5This multi-part technical assessment from Affirm challenges developers to traverse hierarchical entity relationships, consolidate financial metrics upward, and correlate incoming ledger entries with their appropriate targets. The exercise emphasizes reading comprehension, data structure manipulation, and writing clean, maintainable code amidst extensive boilerplate text. It evaluates your practical ability to handle complex relational mappings efficiently under time constraints. The complete problem specifications and clean solution code are available exclusively to paid subscribers.
asked March 2026SWEHashmapPaymentUser Trust Score from Transaction Logs
3/5This Affirm interview question challenges candidates to process transaction logs in two stages. First, identify users who demonstrate consistent activity across multiple days and exhibit a diverse range of order types. Subsequently, for a new transaction, calculate a "trust score" by analyzing a user's past purchasing behavior, considering both the types of items bought and the typical spending amounts. This problem assesses your ability to handle data processing, pattern recognition, and potentially streaming data concepts. The full problem statement and a model solution are available with a subscription.
asked February 2026SWEHashmapSimulationCard Game Simulation
3/5In this engaging coding challenge reported at Affirm, developers must implement a round-based card game simulation using a standard deck to track scores and determine winners. The exercise evaluates state management, array manipulation, and the ability to gracefully handle uneven distributions and edge cases when scaling from two participants to multiple players. It serves as an excellent test of clean logic implementation and procedural thinking under time constraints. Unlock the full problem breakdown and expert-crafted model solution with a subscription.
asked January 2026SWESimulationMedium DifficultyShortest Unique Substring
3/5Examine advanced string manipulation and indexing strategies in this Affirm interview question centered on finding distinctive textual fragments within a collection. The objective is to compute the most concise substring for each item that uniquely identifies it among all competing entries in the dataset. This challenge tests your mastery of efficient string searching algorithms, prefix trees, and hash-based frequency analysis. Subscribe today to view the complete problem statement and detailed model solution.
asked December 2025SWEStringTrieTransaction Aggregation by 24-Hour Buckets
3/5Process and organize financial activity logs in this practical coding challenge based on a reported Affirm software engineering interview. The task evaluates your ability to filter dataset records by specific status criteria and group transaction monetary values into temporal rolling windows using efficient data structures. Unlock the full problem breakdown and optimal algorithmic solution with a subscription.
asked December 2025SWEHashmapPaymentHit Counter
2/5Design a high-performance metrics tracker in this popular Affirm interview coding exercise that records timestamped events and efficiently calculates frequency over a rolling time window. The challenge focuses on choosing the right underlying data structures to handle high-throughput operations with low latency while defending your design choices against interviewer scrutiny. To unlock the complete problem details and working model solution, a subscription is required.
asked October 2025SWEQueueMetricsString Compression and Decompression
3/5Write a matching pair of routines that shorten a string by describing its runs and then restore the original exactly. This Affirm question is specified carefully: if the compressed form is not actually shorter you must return the input untouched, which rules out the naive always-encode approach. You will parse multi-digit run lengths on the way back, keep the two routines exact inverses where it matters, and cover inputs that compress to nothing useful. The full problem and the model solution require a subscription.
StringCompressionDecompressionAggregate records into maps by different dimensions
3/5Group a pile of records by whichever fields the caller names, including combinations of several fields, and return the rolled-up result. This Affirm question is about building a general tool rather than a one-off loop: the grouping key is data, so the implementation must assemble it dynamically. You will choose a hashable key representation, decide how absent fields behave, and keep the aggregation open to more metrics than a plain count. A subscription unlocks the full problem and the reference implementation.
HashmapAggregationGroupingLive Fraud Detector: Count Distinct PII Values in Underwriting Events
3/5Consume a stream of structured events and keep a running count of the distinct personal-data values seen, counting only the event type that matters. This Affirm question is about reading the specification exactly: the other event type must be ignored, and distinctness is across the whole stream rather than per event. You will parse each record defensively, maintain a set of values, and decide what to do with an event missing the field entirely. The complete problem and the reference consumer are available to subscribers.
HashmapStringJSON
Affirm coding interview FAQ
- What coding questions does Affirm ask?
- 18 reported coding questions, most often on SWE, Medium Difficulty, Hashmap, Payment, Affirm.
- How hard is the Affirm coding interview?
- The reported coding questions average 2.9 out of 5: 2 at 2/5, 15 at 3/5, 1 at 4/5.
- Are these Affirm coding questions recent?
- The most recent report is from July 2026, and 14 were reported within the last twelve months. Dates come from the interview reports themselves.