Search
⌘K

Leetcode 2165. Smallest Value of the Rearranged Number

Rearrange the digits of an integer to produce the smallest possible numeric value without changing its sign and without any leading zeros. For positive numbers this means the smallest non-zero-leading permutation, while for negatives you must maximize magnitude (most negative) by ordering digits accordingly.


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.