Medtronic Interview Question

Given an integer n, find the next closest palindrome.

Interview Answer

Anonymous

Aug 19, 2020

- Start out with brute force, increment n until a valid palindrome is found. - Make a new palindrome by finding the middle digit, and rotate left/right halves to create a palindrome m when m > n

1