Reconcile Bank Statement Lines Against Expected Incoming Payments

Last updated: November 29, 2026

Quick Overview

Match free-text bank statement lines to expected customer payments using the payment reference when present and the amount otherwise, labelling each match as matched, amount mismatch or needs review, and report what remains unmatched on both sides.

Wise
Coding & Algorithms
Software Engineer
Wise
November 29, 2026
Software Engineer
Onsite
Coding & Algorithms
Medium

0

0

0 solved


Match free-text bank statement lines to expected customer payments using the payment reference when present and the amount otherwise, labelling each match as matched, amount mismatch or needs review, and report what remains unmatched on both sides.

Customers fund Wise transfers by bank transfer and type the reference themselves, often in lower case, inside other text, or not at all. Matching incoming credits to transfers fast is what makes a transfer start quickly. The interviewer looks for layered matching, refusal to guess when data is ambiguous, and good tests.

What the Interviewer Expects
  • Normalises text and extracts candidate reference tokens
  • Matches by reference first, flags amount differences instead of silently accepting or dropping them
  • Falls back to amount-only matching only when it is unique on both sides
  • Never matches one expected payment twice
  • Returns unmatched items for manual review and discusses auditability
Key Topics to Cover
string parsing
hash maps
multi-pass matching
reconciliation
ambiguity handling
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 handle a customer who sends one payment covering two transfers?
  • How would you add fuzzy matching for references with one typo, and what is the risk?
  • How would this run continuously as statement lines stream in from many banks?
  • Which metrics would tell you the matcher is getting worse?
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

Expected payments have an id, a reference such as P4821XK, and an amount. Statement lines have free text and an amount. Output matches with a status, plus unmatched expected ids and unmatched line i...

High-Level Design

Three passes in decreasing confidence:

  1. Reference token in the text and equal amount: matched.
  2. Reference token found but amount differs: amount_mismatch (customer paid fees or the wrong amoun...

Submit Your Answer
Markdown supported

Related Questions