You are given a words. Each string in words consists of distinct lowercase English letters.
Two strings s1 and s2 are considered connected if s1 can be obtained from s2 by applying any of the following operations at most once:
Adding any single lowercase English letter.
Deleting any single lowercase English letter.
Replacing any single lowercase English letter with any other lowercase English letter.
A group is a subset of strings from words such that every string in the group is connected directly or indirectly to every other string in the same group.
Return an array ans of size
ans[0] is the total number of disjoint groups formed by the strings in words.
ans[1] is the maximum size of a group.
Constraints:
words.length
words[i].length
words[i] consists of lowercase English letters only.
No letter occurs more than once in words[i].
You are given a words. Each string in words consists of distinct lowercase English letters.
Two strings s1 and s2 are considered connected if s1 can be obtained from s2 by applying any of the following operations at most once:
Adding any single lowercase English letter.
Deleting any single lowercase English letter.
Replacing any single lowercase English letter with any other lowercase English letter.
A group is a subset of strings from words such that every string in the group is connected directly or indirectly to every other string in the same group.
Return an array ans of size
ans[0] is the total number of disjoint groups formed by the strings in words.
ans[1] is the maximum size of a group.
Constraints:
words.length
words[i].length
words[i] consists of lowercase English letters only.
No letter occurs more than once in words[i].