Smallest Palindromic Rearrangement II
Choose each left-half letter by counting how many distinct palindromes start with it, subtracting skipped blocks from k until the k-th one is reached.
Choose each left-half letter by counting how many distinct palindromes start with it, subtracting skipped blocks from k until the k-th one is reached.