Search
⌘K

Leetcode 2384. Largest Palindromic Number

Given a string of digits, form the largest numeric palindrome (no leading zeros, must use at least one digit) by selecting and reordering digits from the input. The core challenge is counting digit frequencies and greedily placing the highest possible digit pairs and an optional highest remaining center digit.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.