C Hash Table
\n#define HASH_SIZE 26\n\nint longestPalindrome(char ** words, int wordsSize){   //Hash Table\n    \n    int hash[HASH_SIZE][HASH_SIZE] = {0};\n    int ans = 0;
```\n#define HASH_SIZE 26\n\nint longestPalindrome(char ** words, int wordsSize){   //Hash Table\n    \n    int hash[HASH_SIZE][HASH_SIZE] = {0};\n    int ans = 0;\n    \n    for (int i=0; i<wordsSize; i++) {\n        int a = words[i][0] - \'a\';\n        int b = words[i][1] - \'a\';\n        if(hash[b][a] > 0) {\n            ans += 4;\n            hash[b][a]--;\n        }\n        else\n            hash[a][b]++;\n    }\n    \n    for (int i=0; i<HASH_SIZE; i++) {\n        if (hash[i][i] >= 1) {\n            ans += 2;\n            break;\n        }            \n    }\n    return ans;\n}\n```
[]