C++ Easy T.C.:O(n) and S.C:O(1), beats 98.4% in T.C. and 95% in S.C.
Intuition: \nCount for the number of charachters having odd number of occurences\n Describe your first thoughts on how to solve this problem. \n\n# Approach:\nI
# Intuition: \nCount for the number of charachters having odd number of occurences\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach:\nIf the number of odd occurences of charachters are less than k, we can partition the string in k no.of palndromes.We are counting for odd occurences because eve occurences can be arranged in any order around the \'centre\' of the palindrome.And we need to check additionally, if the k is less than the length of the string to be partiotined, then we don\'t have any way do partition it.\n\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    bool canConstruct(string s, int k) {\n\n        int a[26];  // to store the count of charachters\n        memset(a,0,sizeof(a));\n        int n=s.length();\n        if(k>n)return 0;\n        for(int i=0;i<n;i++)\n        {\n            a[s[i]-\'a\']++;\n        }\n        int res=0;\n        for(int i=0;i<26;i++)\n        {\n            // if count is odd, then increment the resultant\n            if(a[i]%2)res++;\n        }\n        return res<=k;\n    }\n};\n```
['Greedy', 'C++']