c++ || sorting ||easy to understand
\n# Complexity\n- Time complexity:\no(nlogn)\n\n- Space complexity:\nO(1)\n\n# Code\n\nclass Solution {\npublic:\n    int minimumSum(int num)\n    {\n        in
\n# Complexity\n- Time complexity:\no(nlogn)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int minimumSum(int num)\n    {\n        int digit = num;vector<int> v;\n        while(digit!=0)\n        {\n            int temp = digit%10;\n            v.push_back(temp);\n            digit = digit/10;\n        }\n        sort(v.begin(),v.end());\n\n        int num1 = v[0]*10 + v[2];\n        int num2 = v[1]*10 + v[3];\n\n        int sum = num1 + num2;\n        return sum;\n    }\n};\n\n\n```
['C++']