Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.