Validate ABA Routing Numbers in an ACH Upload File
Last updated: November 29, 2026
Quick Overview
Given rows from a business client's ACH upload file, return the indexes of rows whose 9-digit ABA routing number is malformed or fails the 3-7-1 checksum.
Bank of America
November 29, 20260
0
0 solved
Given rows from a business client's ACH upload file, return the indexes of rows whose 9-digit ABA routing number is malformed or fails the 3-7-1 checksum.
A warm-up in the style of a Global Technology online assessment, framed around CashPro bulk payment uploads where a bad routing number turns into a returned ACH item days later. The interviewer checks careful input validation, string handling and that you know a checksum is not the same as existence.
What the Interviewer Expects
- Reject anything that is not exactly 9 digits after trimming whitespace
- Apply the 3-7-1 weighted checksum correctly
- Check the Federal Reserve prefix ranges as an extra sanity rule
- Return row indexes so the client can fix the file
- Explain that passing the checksum does not prove the bank exists
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 confirm the routing number belongs to an active institution?
- How would you report errors for a 200,000 row file without failing the whole upload?
- Would you ever auto-correct a single wrong digit?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice DSA ProblemsSample Answer
Requirements
Input is a list of strings from an upload file. A row is valid if, after trimming, it is 9 digits, its first two digits fall in a valid Federal Reserve range (00 to 12, 21 to 32, 61 to 72, or 80), and...
High-Level Design
Validate each row on its own with a pure function, then collect failures. Keeping is_valid_routing pure makes it reusable in the UI (inline validation while typing) and in the batch pipeline, and ea...