Solution for C++ - sort and calcuate directly
cpp\nclass Solution\n{\npublic:\n    int minimumSum(int num)\n    {\n        string s = to_string(num);\n        sort(s.begin(), s.end());\n        int res = (s
```cpp\nclass Solution\n{\npublic:\n    int minimumSum(int num)\n    {\n        string s = to_string(num);\n        sort(s.begin(), s.end());\n        int res = (s[0] - \'0\' + s[1] - \'0\') * 10 + s[2] + s[3] - \'0\' - \'0\';\n        return res;\n    }\n};\n```
['C']