Problem 1638 · Medium

Count Substrings That Differ by One Character

Count pairs of same-length substrings from two strings that differ in exactly one position. The visual aligns the two strings and marks each position where a single mismatch is allowed.

Open the interactive visualisation