Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
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.
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.