[C++] Number of Odd frequency character
If k is more than n then palindromes are never possible.\nOtherwise, if the odd frequency character count is less than k, you can always make k palindromes.\n\n
If `k` is more than `n` then palindromes are never possible.\nOtherwise, if the odd frequency character count is less than `k`, you can always make `k` palindromes.\n\nFor example : `s = Leetcode` and `k = 5`\n\nWe have odd freq characters : `{L, e, t, c, o, d}` , we can create 5 palindromes, but then atleast one of the characters from these odd frequency ones, will be left, Hence false.\n\n\n```\nclass Solution {\npublic:\n    bool canConstruct(string s, int k) {\n        int n = s.size();\n        if(k > n)\n            return 0;\n        if(k == n)\n            return 1;\n        vector<int> f(26);\n        for(int i = 0; i < n; i++)\n            f[s[i] - \'a\']++;\n        \n        int c = 0;\n        for(int i = 0; i < 26; i++)\n        {\n            if(f[i] % 2 == 1)\n                c++;\n        }\n        return c <= k;\n    }\n};\n```
[]