Algorithm · Roblox · Hard
Given an integer n, return the nearest palindromic integer other than the number itself. When two candidates are equally close, choose the numerically smaller candidate. Closeness is determined by minimizing the absolute difference between the two integer values. Interviewer-requested variation: solve the task without converting the integer input into a string or array; instead, manipulate the integer directly. A string-based approach may mirror digits for readability, while…
Checking your access…