Problem 1842 · Medium
A palindrome is fixed by its first half, so take the next permutation of that half and mirror it.
Open the interactive visualisation