Problem
You may swap two digits of the non-negative integer num at most once. Return the largest number you can get.
Example 1
- Input
- num = 2736
- Output
- 7236
Example 2
- Input
- num = 9973
- Output
- 9973
- Why
- already the largest, no swap
Example 3
- Input
- num = 1993
- Output
- 9913
Constraints
0 <= num <= 10^8