1554. Strings Differ by One Character
https://leetcode.com/problems/strings-differ-by-one-character
Description
Given a list of strings dict
where all the strings are of the same length.
Return True
if there are 2 strings that only differ by 1 character in the same index, otherwise return False
.
**Follow up:**Could you solve this problem in O(n*m) where n is the length of dict
and m is the length of each string.
Example 1:
Example 2:
Example 3:
Constraints:
Number of characters in
dict <= 10^5
dict[i].length == dict[j].length
dict[i]
should be unique.dict[i]
contains only lowercase English letters.
ac
Last updated