...

/

Next Palindrome Using Same Digits

Next Palindrome Using Same Digits

Try to solve the Next Palindrome Using Same Digits problem.

Statement

Given a numeric string, num_str, representing a palindromeA palindrome is a number that reads the same backward as it does forward. (composed only of digits). Return the smallest palindrome larger than num_str that can be created by rearranging its digits. If no such palindrome exists, return an empty string "".

Consider the following example to understand the expected output for a given numeric string:

  • input string = ...