Flag Lookalike Vendor Domains Using Confusable Normalization

Last updated: November 29, 2026

Quick Overview

Given a list of inbound sender domains and a list of trusted vendor domains, return every sender domain that is not trusted itself but is within one edit of a trusted domain after mapping common confusable characters (0 to o, 1 to l, rn to m).

Abnormal Security
Coding & Algorithms
Software Engineer
Abnormal Security
November 29, 2026
Software Engineer
Phone Screen
Coding & Algorithms
Easy

0

0

0 solved


Given a list of inbound sender domains and a list of trusted vendor domains, return every sender domain that is not trusted itself but is within one edit of a trusted domain after mapping common confusable characters (0 to o, 1 to l, rn to m).

Vendor email compromise and invoice fraud often arrive from domains that differ from a real supplier by one character, so this is a natural warm-up for a detection engineering phone screen at Abnormal. The interviewer checks that you can write a clean linear edit-distance check, think about normalization order, and avoid flagging the trusted domain itself.

What the Interviewer Expects
  • Normalizes both sides with the same confusable map before comparing
  • Writes an O(n) one-edit check instead of full Levenshtein DP
  • Skips exact matches to trusted domains
  • Handles multi-character confusables (rn) before single ones
  • Discusses false positives on short domains
Key Topics to Cover
edit distance
string normalization
homoglyphs
vendor email compromise
two pointers
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 catch transpositions such as googel.com versus google.com?
  • The trusted list has 200,000 vendor domains. How do you avoid comparing every pair?
  • How would you handle internationalized (punycode) domains?
  • Which extra signals would you combine with this before quarantining a message?
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

Inputs: senders (list of domains seen on inbound mail) and trusted (vendor domains a tenant actually does business with). Output: pairs (sender, trusted_match) for senders that are not trusted b...

High-Level Design
  1. Build a set of exact trusted domains so legitimate mail is skipped in O(1).
  2. Precompute the normalized form of each trusted domain.
  3. For each sender, normalize it and run a one-edit check again...

Submit Your Answer
Markdown supported

Related Questions