Search
⌘K

Leetcode 2231. Largest Number After Digit Swaps by Parity

Given an integer, you may swap any two digits that share parity (both even or both odd); compute the maximum possible integer obtainable by permuting digits within each parity group.


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.