C++ Easy Solution
We can directly sort 4 digits and select the first and third digit form num1 number .Then select 2 and last digit and num2 and then return the sum of num1 and n
We can directly sort 4 digits and select the first and third digit form num1 number .Then select 2 and last digit and num2 and then return the sum of num1 and num2.\n```\nclass Solution {\npublic:\n    int minimumSum(int num) {\n        vector<int>digit(4);\n\t\twhile(num > 0)\n\t\t{\n\t\t\tdigit.push_back(num%10)\n\t\t\tnum/=10;\n\t\t}\n\t\t\n\t\twhile(digit.size()<4)\n\t\t\tdigit.push_back(0);\n\t\t\t\n\t\tsort(digit.begin(),digit.end());\n\t\tint num1 = 0 , num2 = 0;\n\t\t\n\t\tnum1 = digit[0]*10 + digit[2];  //from first number\n\t\tnum2 = digit[1]*10 + digit[3]; //form second number\n\t\t\n\t\treturn num1+num2;\n    }\n};\n```
['Sorting']