Easy C++ solution with explanation
IntuitionWe can make a palindrome if we have one character which occurs a single time and rest occur in pairs, or if all the characters occur in pairs.
example
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
We can make a palindrome if we have one character which occurs a single time and rest occur in pairs, or if all the characters occur in pairs.
example - in aabaa: a occurs in pairs two times while b occurs a single time

# Approach
<!-- Describe your approach to solving the problem. -->
We will count the number of times single character occurs and since we have to form k palindrome strings, we want that number to be less than or equal to k.
Also we want the string's length to atleast be equal to k.

# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->
O(n) because we traverse the string once and we also travel the map but since we are storing lowercase english letters hence it will be O(n + 26) which simplifies to O(n).

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
We are using a map which can at most be O(26) which is constant hence space complexity comes down to O(1).

# Code
```cpp []
class Solution {
public:
    //here we can first count the number of times characters in the string.
    //then if the number of characters that occur 1 times is > k then it is not possible to construct the string
    //we will consider the characters in pairs
    bool canConstruct(string s, int k) {
        if(s.length() < k){
            return false;
        }
        unordered_map<char, int> mp;
        for( int i = 0; i < s.length(); i++ ){
            mp[s[i]]++;
        }
        int single = 0;
        for( auto val: mp ){
            single += (val.second % 2);
        }
        return single <= k ? true : false;
    }
};
```
['C++']