Leetcode 2452. Words Within Two Edits of Dictionary
Given equal-length lowercase words, return all queries that can be turned into some dictionary word with at most two letter substitutions — equivalently, whose Hamming distance to at least one dictionary word is ≤ 2. Check each query against dictionary words and count mismatches (early exit when >2) to decide inclusion.
Asked at:
Google
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Late May, 2026
Staff
Hello Interview Premium
Your account is free and you can post anonymously if you choose.