✔️ Easy Solution Using C++ || Best Solution || 100% Accepted
\nclass Solution {\npublic:\n    int minimumSum(int num) {\n        int arr[4]; // declaring an array\n        arr[0] = num%10; //storing each digit in this arr
```\nclass Solution {\npublic:\n    int minimumSum(int num) {\n        int arr[4]; // declaring an array\n        arr[0] = num%10; //storing each digit in this array\n        arr[1] = (num/10)%10;\n        arr[2] = (num/100)%10;\n        arr[3] = (num/1000)%10;\n        sort(arr, arr + 4);\n        return (arr[0]*10+arr[2]) + (arr[1]*10+arr[3]); //for ex{2,2,3,9} --> {23+29}\n    }\n};\n```
['C', 'C++']