LeetCode 266, Easy. Topics: Bit Manipulation, Hash Table, String. View on LeetCode.
Generate this problem as a practice environment: tested reference solution, 15 parametrized pytest cases, and a playground notebook:
Problem
Given a string s, return true if a permutation of the string could form a palindrome and false otherwise.
Examples
Constraints
1 <= s.length <= 5000
s consists of only lowercase English letters.
Solution
Reference implementation from solution.py on GitHub, full suite in test_solution.py:
Complexity
NeetCode All. Last modified on September 7, 2026