Problem 3518 · Hard

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.

Open the interactive visualisation