You are given an array of strings words.
The distance between two indices i and j (where i j) is defined as j i
Return the maximum distance between two indices i and j such that words[i] words[j]. If no two unequal words exist, return
Constraints:
words.length
words[i].length
words[i] consists of lowercase English letters.
You are given an array of strings words.
The distance between two indices i and j (where i j) is defined as j i
Return the maximum distance between two indices i and j such that words[i] words[j]. If no two unequal words exist, return
Constraints:
words.length
words[i].length
words[i] consists of lowercase English letters.