1842. Next Palindrome Using Same Digits
Two PointersString
Hints
Hint 1
Is it possible to swap one character in the first half of the palindrome to make the next one?
Hint 2
Are there different cases for when the length is odd and even?
Preparing judge…