C++ || BITMASK
```\nclass Solution {\npublic:\n    \n    bool isPalindrome(string s){\n        if(s.size() == 1) return true;\n        string tmp = s;\n        reverse(tmp.beg
```\nclass Solution {\npublic:\n    \n    bool isPalindrome(string s){\n        if(s.size() == 1) return true;\n        string tmp = s;\n        reverse(tmp.begin(),tmp.end());\n        return tmp == s;\n    }\n    \n    int maxProduct(string s) {\n           int n = s.size();\n           map<int,int> mp;\n           for(int mask=1; mask < (1<<n); mask++){\n                string subseq;\n                for(int i=0; i<n; i++){\n                    if((mask & 1<<i))\n                        subseq += s[i];\n                }\n                \n                 if(isPalindrome(subseq)){\n                     mp[mask] = subseq.size();\n                 }\n           }\n           \n            int ans = INT_MIN;\n         \n         for(auto it1 = mp.begin(); it1 != mp.end(); it1++){\n             for(auto it2 = mp.begin(); it2 != mp.end(); it2++){\n                 if( (it1->first & it2->first) == 0){\n                     ans = max(ans, it1->second * it2->second);\n                 }\n             }\n         }\n        \n          return ans;\n        \n    }\n};
['Bit Manipulation', 'C', 'Bitmask']