✅✅Beats 100%🔥Java🔥Python|| 🚀🚀Super Simple and Efficient Solution🚀🚀||🔥Python🔥Java✅✅
Complexity
Time complexity: O(n)

Space complexity: O(1)
Code
# Complexity
- Time complexity: $$O(n)$$
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: $$O(1)$$
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
  public boolean canConstruct(String s, int k) {
    if (s.length() < k)
      return false;
    int[] count = new int[26];
    for (final char c : s.toCharArray())
      count[c - 'a'] ^= 1;
    return Arrays.stream(count).filter(c -> c % 2 == 1).count() <= k;
  }
}
```
```python []
class Solution:
  def canConstruct(self, s: str, k: int) -> bool:
    return sum(freq & 1
               for freq in collections.Counter(s).values()) <= k <= len(s)
```
['Hash Table', 'String', 'Greedy', 'Counting', 'Java', 'Python3']