Kotlin. Beats 100% (3 ms). Counting odd bits (bitwise solution).
Code
![image.png](https://assets.leetcode.com/users/images/082b93ec-43ad-4d6f-8f7f-1dab849c4c10_1736583876.5047762.png)

# Code
```kotlin []
class Solution {
    fun canConstruct(s: String, k: Int): Boolean {
        if (s.length < k) return false

        var bits = 0
        val s = s.toCharArray()
        for (c in s) {
            bits = bits xor (1 shl (c - 'a'))
        }
        return Integer.bitCount(bits) <= k
    }
}
```
['Kotlin']