[C++] Simple Solution using Backtracking
\n2 Cases at each pos, \n1.  Not Pick that char in any string\n2.  Pick that char, here 2 sub cases\n\ta. Pick in 1st String\n\tb. Pick in 2nd String\n\nbool is
\n**2 Cases at each pos**, \n1.  Not Pick that char in any string\n2.  Pick that char, here 2 sub cases\n\ta. Pick in 1st String\n\tb. Pick in 2nd String\n```\nbool isPalin(string &s) {\n\tint i = 0, j = s.length() - 1;\n\twhile(i < j) {\n\t\tif(s[i] != s[j]) return false;\n\t\ti++;\n\t\tj--;\n\t}\n\treturn true;\n}\n\nvoid dfs(string &s, int p, string &s1, string &s2, int &ans) {\n\tif(p >= s.length()) {\n\t\tif(isPalin(s1) && isPalin(s2)) {\n\t\t\tint tmp = s1.length() * s2.length();\n\t\t\tans = max(ans, tmp);\n\t\t}\n\t\treturn;\n\t}\n\t// Case 1: Not Pick\n\tdfs(s, p + 1, s1, s2, ans);\n\t\n\t// Case 2: Pick -> 2 cases\n\t// 2(a): Pick in 1st string\n\ts1.push_back(s[p]);\n\tdfs(s, p + 1, s1, s2, ans);\n\ts1.pop_back();\n\n\t// 2(b): Pick in 2nd string\n\ts2.push_back(s[p]);\n\tdfs(s, p + 1, s1, s2, ans);\n\ts2.pop_back();\n}\n\nint maxProduct(string s) {\n\tint ans = 0;\n\tstring s1 = "", s2 = "";\n\tdfs(s, 0, s1, s2, ans);\n\treturn ans;\n}\n```
['Backtracking', 'C', 'C++']