Search
⌘K
Get Premium
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.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.