Palindrome Pair

题目描述

Example 1:- Consider a list {bat, tab, cat}. Then bat and tab can be joined together to form a palindrome.

Example 2 :- {ab, deedba} can be joined to form a palindrome.

Expecting a O(nk) solution where n = number of words and k is length of the longest word.

解题方法

Solution

Reference