Leetcode 1842. Next Palindrome Using Same Digits
Given a number, rearrange its digits to form the smallest palindrome strictly greater than the original using exactly the same digits (or report impossible). The core challenge is to build a valid palindromic half from digit counts and find the next lexicographic arrangement (including handling the middle digit for odd lengths and parity constraints) that yields a larger number.
Asked at:
Uber
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Late May, 2026
Uber
Senior
Mid March, 2026
Uber
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.