All prompts are owned by LeetCode. To view the prompt, click the title link above.
First completed : March 15, 2025
Last updated : March 15, 2025
Related Topics : Hash Table, String, Bit Manipulation
Acceptance Rate : 68.23 %
class Solution:
def canPermutePalindrome(self, s: str) -> bool:
return sum(x % 2 for x in Counter(s).values()) <= 1