2744. Find Maximum Number of String Pairs
You are given a 0-indexed array
words
consisting of distinct strings.The string
words[i]
can be paired with the stringwords[j]
if:
- The string
words[i]
is equal to the reversed string ofwords[j]
.0 <= i < j < words.length
.Return the maximum number of pairs that can be formed from the array
words
.Note that each string can belong in at most one pair.
1 | class Solution { |