Reconcile Internal Ledger Against a Partner Bank Settlement File
Last updated: November 29, 2026
Quick Overview
Given internal ledger entries and a partner bank settlement file (each row has a reference, amount in cents, and day), classify every row as matched, amount mismatch, missing in bank, missing in ledger, or fuzzy matched when the bank dropped the reference but amount and date line up.
Onepay
November 29, 20260
0
0 solved
Given internal ledger entries and a partner bank settlement file (each row has a reference, amount in cents, and day), classify every row as matched, amount mismatch, missing in bank, missing in ledger, or fuzzy matched when the bank dropped the reference but amount and date line up.
OnePay accounts are held at partner banks, so every day the internal ledger has to agree with what the bank says settled. This onsite coding question checks that you design a clear multi-pass match, keep fuzzy matching one-to-one, and produce output an operations team can act on.
What the Interviewer Expects
- Exact reference match first, then a constrained fuzzy pass
- Fuzzy matching is one-to-one and prefers the closest date
- Amount mismatches are reported, never silently accepted
- Every input row ends up in exactly one bucket
- Discuss when fuzzy matches should go to human review instead of auto-clearing
Key Topics to Cover
How to Approach This
- Clarify input constraints and edge cases before writing code.
- Walk through your approach verbally and confirm with the interviewer before coding.
- Start with a brute force solution, then optimize. Mention time and space complexity.
- Test your solution with examples, including edge cases like empty input or duplicates.
- Consider common patterns: sliding window, two pointers, hash map, BFS/DFS, dynamic programming.
Possible Follow-up Questions
- What if one ledger entry settles as two bank rows (split settlement)?
- The file has 50 million rows. How do you run this without loading everything into memory?
- How would you make the job safe to re-run when the bank sends a corrected file?
- Which buckets should page someone and which should just open a ticket?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Inputs are two lists of {ref, amount, day}. Bank rows may have ref set to None. Output five buckets. A ledger entry and bank row with the same ref match if amounts agree, otherwise they are an amo...
High-Level Design
Pass 1 is a hash join on ref, which handles the vast majority of rows. Pass 2 groups leftover bank rows by amount, then for each leftover ledger entry (processed in date order for determinism) picks t...