Easy code
Intuition\nEasy to Understand\n# Approach\n1)int -> string\n2)sort string\n3)fix at correct string\n4)string to int and return its sum\n\n# Complexity\n- Time c
# Intuition\nEasy to Understand\n# Approach\n1)int -> string\n2)sort string\n3)fix at correct string\n4)string to int and return its sum\n\n# Complexity\n- Time complexity:\nO(n) n <= 4 so o(1);\n- Space complexity:\n- o(1)\n\n\n# Code\n```\nclass Solution {\nint myAtoi(string str)\n{\n    int res = 0;\n \n        res = res * 10 + str[i] - \'0\';\n \n    return res;\n}\npublic:\n    int minimumSum(int num) {\n        string s = to_string(num);\n        sort(s.begin(), s.end());\n        string a = "", b = "";\n        a.push_back(s[0]);\n        a.push_back(s[2]);\n        b.push_back(s[1]);\n        b.push_back(s[3]);\n\n        int x = myAtoi(a);\n        int y = myAtoi(b);\n\n        return x+y;\n\n    }\n};\n```
['Math', 'C++']