[C++] Simple Solution
Code
# Code
```cpp []
class Solution {
public:
    int minMaxDifference(int num) {
        string sNum = to_string(num);
        char first = sNum[0];
        char chToIncrease = sNum[0];
        for(int i=0; i<sNum.size(); i++) {
            if(sNum[i] != '9') {
                chToIncrease = sNum[i];
                break;
            }
        }

        string mx = sNum;
        string mn = sNum;
        

        for(int i=0; i<mx.size(); i++) {
            if(mx[i] == chToIncrease) {
                mx[i] = '9';
            }
            if(mn[i] == first) {
                mn[i] = '0';
            }
        }

        cout << mx << " " << mn;

        int mxNum = stoi(mx);
        int mnNum = stoi(mn);
        
        return mxNum - mnNum;
    }
};
```
['C++']