
Write a function to find the next smallest palindrome of a s...
Prompt
Write a function to find the next smallest palindrome of a specified integer, returned as an integer. Your function should satisfy these tests: ```python assert next_smallest_palindrome(99)==101 assert next_smallest_palindrome(1221)==1331 assert next_smallest_palindrome(120)==121 ```
Answer guidance
Reference solution: import sys def next_smallest_palindrome(num): numstr = str(num) for i in range(num+1,sys.maxsize): if str(i) == str(i)[::-1]: return i
Drag to resize
Drag to resize
Drag to resize