You are given an array of strings words.
The distance between two indices i and j (
Return the maximum distance between any two indices i and j such that words[i] \neq words[j]. If no two unequal strings exist in words, return
Constraints:
words.length
words[i].length
words[i] consists only of lowercase English letters.
You are given an array of strings words.
The distance between two indices i and j (
Return the maximum distance between any two indices i and j such that words[i] \neq words[j]. If no two unequal strings exist in words, return
Constraints:
words.length
words[i].length
words[i] consists only of lowercase English letters.