Analysis
- We can convert every word into a number which can represent the appearance of every character. Since the length of Int is 32bits. So it is sufficient to use bit to represent them.
Time Complexity
- MAX(O(n^2), O(n*m))
Space Comlexity
- O(n)
1 | class Solution { |