Lexicographically Smallest String After a Swap
Swap the first adjacent pair of same-parity digits that is out of order, since an earlier position matters most.
Swap the first adjacent pair of same-parity digits that is out of order, since an earlier position matters most.