LeetCode 564: Find the Closest Palindrome
Problem Restatement We are given a string n representing an integer. Return the closest integer palindrome to n . The returned palindrome must not be n itself. If there are two palindromes with the same distance from n , return the smaller one. The input length is at most 18 , so the number can be too large for some fixed-width integer languages, but Python can handle it directly. The...