Java - Simple Recursion
\nclass Solution {\n    \n    int max = 0;\n    public int maxProduct(String s) {\n        \n        char[] c = s.toCharArray();\n        dfs(c, 0, "", "");\n  
```\nclass Solution {\n    \n    int max = 0;\n    public int maxProduct(String s) {\n        \n        char[] c = s.toCharArray();\n        dfs(c, 0, "", "");\n        \n        return max;\n    }\n    \n    public void dfs(char[] c, int i, String s1, String s2){\n        \n        if(i >= c.length){\n            \n            if(isPalin(s1) && isPalin(s2))\n                max = Math.max(max, s1.length()*s2.length());\n            return;\n        }\n        \n        dfs(c, i+1, s1+c[i], s2);\n        dfs(c, i+1, s1, s2+c[i]);\n        dfs(c, i+1, s1, s2);\n    }\n    \n     public boolean isPalin(String str){\n \n        int i = 0, j = str.length() - 1;\n \n        while (i < j) {\n \n            if (str.charAt(i) != str.charAt(j))\n                return false;\n            i++;\n            j--;\n        }\n \n        return true;\n    }\n}\n```
['Backtracking', 'Recursion', 'Java']