### Problem
Return the greatest integer obtainable from num by swapping two decimal digit positions at most once. Leaving the digits unchanged is allowed.
```cpp
class Solution {
public:
int maximumSwap(int num);
};
```
### Examples
**Example 1:**
```text
num = 1993
Output: 9913
Explanation: Swap the first 1 with the rightmost 9.
```
**Example 2:**
```text
num = 4321
Output: 4321
Explanation: No swap improves the value.
```
### Constraints
- The integer num is nonnegative and at most 100000000.
### Clarifying Questions
Prioritize the earliest improved digit and allow no swap when already maximal.
```hint Read the boundary condition
If the largest useful replacement digit appears twice, which occurrence should receive the smaller digit?
```
### Contract considerations
Prioritize the earliest improved digit and allow no swap when already maximal.
Overview: Maximize an Integer with at Most One Digit Swap. Return the greatest integer obtainable from num by swapping two decimal digit positions at most once.