Problem 336: Palindrome Pairs

https://leetcode.com/problems/palindrome-pairs/#/description

思路

  • 总体的思路就是遍历每个 word, 然后把它拆分成 str1str2 两个字符串。

  • 如果 str1 已经是回文,那么我们只需要给 str2 找个伴儿即可 !

Last updated

Was this helpful?