DeepSeek LeetCode 3734. 大于目标字符串的最小字典序回文排列 TypeScript实现
typescript
function lexPalindromicPermutation(s: string, target: string): string {const n: number s.length;const half: number Math.floor(n / 2);// 统计字符频次const cnt: number[] new Array(26).fill(0);for (const ch of s) {cnt[ch.charCodeAt(0) - 97];}// …
2026/7/27 7:54:41