```
class Solution {
public boolean canPermutePalindrome(String s) {
if (s == null || s.length() < 1) return true;
//int vector = 0;
BitSet vector = new BitSet(256);
for (int i = 0; i < s.length(); i++) {
//vector ^= 1 << (s.charAt(i) - 'a');
vector.flip(s.charAt(i));
}
//return vector == 0 || (vector & (vector - 1)) == 0;
return vector.cardinality() == 0 || vector.cardinality() == 1;
}
}
```