C++ (Backtrack : C++ users, please pass string by reference to PASS)
\nclass Solution {\npublic:\nint ans=INT_MIN;\nint maxProduct(string s) \n{\n\t//im trying to get all the disjoint subsequences\n\t\n    //the ith char can be i
```\nclass Solution {\npublic:\nint ans=INT_MIN;\nint maxProduct(string s) \n{\n\t//im trying to get all the disjoint subsequences\n\t\n    //the ith char can be in none of the string\n\t//the ith char can be in the first string\n\t//the ith cahr can be in the second string\n\t\n\tint idx=0;\n\tstring s1="";\n\tstring s2="";\n    fun(s,idx,s1,s2);\n\treturn ans;\n}\nvoid fun(string &s,int idx,string &s1,string &s2)\n{\n\tif(idx >= s.length())\n\t{\n\t\tif(ispalin(s1)==true and ispalin(s2)==true)\n\t\t{\n\t\t\tint temp = s1.length() * s2.length();\n\t\t\tans=max(ans,temp);\n\t\t}\n\t\treturn;\n\t}\n\t\n\tchar ch = s[idx];\n\t\n\t//if the currchar got include in the first string s1\n\ts1.push_back(ch);\n\tfun(s,idx+1,s1,s2);\n\ts1.pop_back();\n\t\n\ts2.push_back(ch);\n\tfun(s,idx+1,s1,s2);\n    s2.pop_back();\n\t\n\tfun(s,idx+1,s1,s2);\n}\nbool ispalin(string &s)\n{\n\tint i = 0;\n        int j = s.length() - 1;\n \n        while (i < j) {\n            if (s[i] != s[j]) return false;\n            i++;\n            j--;\n        }\n \n        return true;\n}\n};\n```
['Dynamic Programming', 'Backtracking', 'Recursion', 'C', 'C++']