Practice Groups of Strings
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Treat each word as its set of lowercase letters; no letter repeats within a word. Two entries connect if one set can become the other by adding one letter, deleting one letter, or replacing one letter, including replacement by itself. Group entries into connected components, including singletons. Return [numberOfGroups,largestGroupSize]; repeated entries count separately in a group size.
Source: Groups of Strings on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
words = ["a","b","ab","cde"]
[2,3]
# Example 2
words = ["a","ab","abc"]
[1,3]
Constraints
Related LeetCode Problems
Practice more problems similar to Groups of Strings.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.