Java | 0 ms | 100% faster
\nclass Solution {\n    public int minimumSum(int num) {\n        int arr[]=new int[4];\n        int i=0;\n        int num2=num;\n        while(num>0){\n       
```\nclass Solution {\n    public int minimumSum(int num) {\n        int arr[]=new int[4];\n        int i=0;\n        int num2=num;\n        while(num>0){\n            arr[i]=num%10;\n            num=num/10;\n            i++;\n        }\n        Arrays.sort(arr);\n        int n1=arr[3]+10*arr[0];\n        int n2=arr[2]+ 10*arr[1];\n        return n1+n2;\n    }\n}\n```
['Java']