267-Palindrome-Permutation-Ii
Sat 17 May 2025
https://leetcode.com/problems/palindrome-permutation-ii
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
def generatePalindromes(self, s: str) -> List[str]:
# Get character occurrence
count = Counter(s)
# Count odd one
odd = sum(value & 1 for value in count.values())
# can't form any …Category: leetcode
Read More