Reconcile Pending Authorizations Against Posted Card Transactions
Last updated: November 29, 2026
Quick Overview
Given a list of pending card authorizations and a list of posted transactions, each keyed by an authorization code with an amount in cents, report pending authorizations that never posted, posted transactions with no matching authorization, and matches whose amount changed.
Capital One
November 29, 20260
0
0 solved
Given a list of pending card authorizations and a list of posted transactions, each keyed by an authorization code with an amount in cents, report pending authorizations that never posted, posted transactions with no matching authorization, and matches whose amount changed.
Capital One's online assessment often opens with a short hashing problem dressed in card-processing language. Pending-to-posted reconciliation is a real nightly concern for card ledgers (tips, fuel pre-auths and hotel holds change amounts), so the grader checks whether you reach for a dictionary instead of nested loops and whether you separate the three outcome buckets cleanly.
What the Interviewer Expects
- Index one side in a hash map keyed by authorization code
- Single pass over posted records classifying each one
- Report amount differences with both the authorized and posted values
- Preserve input order in each output list
- Linear time and space with a clear explanation
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
- How would you handle one authorization that posts as two partial settlements?
- What changes if the same authorization code can appear twice in the pending list?
- How would you run this over billions of records split across files that do not fit in memory?
- Should a 20 percent tip adjustment on a restaurant charge be flagged as a mismatch?
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:
pendingandposted, each a list of(auth_code, amount_cents). - Output three buckets:
stale_pending(authorized but never posted),unmatched_posted(posted without an authorization...
High-Level Design
Build a dictionary code -> authorized amount from the pending list. Walk the posted list once: a missing code goes to unmatched_posted; a present code is marked as seen and compared on amount. Fin...