1842. Next Palindrome Using Same Digits
Description
**Input:** num = "1221"
**Output:** "2112"
**Explanation:** The next palindrome larger than "1221" is "2112".**Input:** num = "32123"
**Output:** ""
**Explanation:** No palindromes larger than "32123" can be made by rearranging the digits.**Input:** num = "45544554"
**Output:** "54455445"
**Explanation:** The next palindrome larger than "45544554" is "54455445".ac
Last updated