C++ : Try all Permutations
```\nint minimumSum(int num) {\n        string s=to_string(num);\n        int sum=INT_MAX;\n        vector v{0,1,2,3};\n        do{\n            int n1=(s[v[0]]
```\nint minimumSum(int num) {\n        string s=to_string(num);\n        int sum=INT_MAX;\n        vector<int> v{0,1,2,3};\n        do{\n            int n1=(s[v[0]]-\'0\')*10+(s[v[1]]-\'0\');\n            int n2=(s[v[2]]-\'0\')*10+(s[v[3]]-\'0\');\n            sum=min(sum,n1+n2);\n        }\n        while(next_permutation(v.begin(),v.end()));\n        \n        return sum;\n    }\n
[]