only one loop || faster 83% || memory 78%
\nclass Solution {\n    public int minimumSum(int num) {\n        int[] n = new int[4];\n        int index=0;\n        while(num>0)\n        {\n            n[in
```\nclass Solution {\n    public int minimumSum(int num) {\n        int[] n = new int[4];\n        int index=0;\n        while(num>0)\n        {\n            n[index++] = num%10;\n            num/=10;\n        }\n        Arrays.sort(n);\n       return (n[0]*10 + n[2] + n[1]*10 + n[3]);\n        \n    }\n}\n```
['Java']