Leetcode 3303. Find the Occurrence of First Almost Equal Substring
Given strings s and pattern, return the smallest starting index of a substring of s with the same length as pattern whose Hamming distance to pattern is at most 1 (i.e., can be made identical by changing at most one character), or -1 if none exists. With |s| up to 1e5, this requires checking all length-m windows efficiently (e.g., via a sliding-window/rolling mismatch count).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.