← ALL NOTES
Array

2131. Longest Palindrome by Concatenating Two Letter Words

Given words of length-2 strings (with repeats), find the max length of a palindrome formed by concatenating some of them (each at most once), in any order. A word "ab" pairs with its mirror "ba";…

Loading…