Validate IBAN Check Digits for Incoming SEPA Payment Instructions

Last updated: November 29, 2026

Quick Overview

Write a function that takes an IBAN string (possibly with spaces) and returns whether it passes the ISO 13616 mod-97 check. Do it without converting the whole rearranged string into one big integer.

Deutsche Bank
Coding & Algorithms
Software Engineer
Deutsche Bank
November 29, 2026
Software Engineer
Online Assessment
Coding & Algorithms
Easy

0

0

0 solved


Write a function that takes an IBAN string (possibly with spaces) and returns whether it passes the ISO 13616 mod-97 check. Do it without converting the whole rearranged string into one big integer.

Deutsche Bank's Corporate Bank processes very large volumes of SEPA credit transfers, and malformed account identifiers are rejected at the payment gateway before they reach clearing. A graduate or associate online assessment uses this kind of task to check careful string handling and whether the candidate knows how to do modular arithmetic incrementally.

What the Interviewer Expects
  • Normalise input by removing spaces and uppercasing
  • Reject wrong length or non-alphanumeric characters before doing math
  • Move the first four characters to the end and map letters to 10 to 35
  • Compute the remainder digit by digit to avoid huge integers
  • Return true only when the remainder equals 1
Key Topics to Cover
String normalisation
Modular arithmetic
ISO 13616 IBAN
Input validation
Payments
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 also validate the country-specific length (DE is 22, GB is 22, FR is 27)?
  • How would you generate the two check digits for a new domestic account number?
  • Where in a payment pipeline should this check run, and what error code should the client get?
  • What does the mod-97 check catch, and what kinds of errors can slip through?
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

Input is a string like DE89 3704 0044 0532 0130 00. Output is a boolean. Spaces are allowed for readability, letters may be lowercase. An IBAN is 2 letters of country code, 2 check digits, then up t...

High-Level Design
  1. Strip spaces, uppercase.
  2. Structural checks: length range, alphanumeric only, first two letters, next two digits.
  3. Rearrange: move the first four characters to the end.
  4. Replace each letter w...

Submit Your Answer
Markdown supported

Related Questions