private boolean isPalindrome(String word) {
        int start = 0;
        int end = word.length() - 1;
        while (start < end) {
            if (word.charAt(start) != word.charAt(end)) {
                return false;
            }
            start++;
            end--;
        }
        return true;
    }
Given a list of unique words. Find all pairs of distinct indices (i, j) in the given list,
so that the concatenation of the two words, i.e. words[i] + words[j] is a palindrome.

Solution -
First keep mapping of word and its index.
Then iterate through every word and split it into every possible 2 substring. Then if first substring is palindrome
and reverse of second substring is in map means you can form a palindrome by combing this word with the word
in the map.

Time complexity is O(n*k*k)

Reference
https://leetcode.com/problems/palindrome-pairs/
src/com/interview/string/PalindromePair.java