[LeetCode] 2131. Longest Palindrome by Concatenating Two Letter Words

1 · Rain Hu · Nov. 3, 2022, 3:34 p.m.
2131. Longest Palindrome by Concatenating Two Letter Words Hardness: \(\color{orange}\textsf{Medium}\) Ralated Topics: Array、Hash Table、String、Greedy、Counting 一、題目 You are given an array of strings words. Each element of words consists of two lowercase English letters. Create the longest possible palindrome by selecting some elements from words and concatenating them in any order. Each element can be selected at most once. Return the length of the longest palindrome that you can create. If it is...