Java beats 100%
Intuition\n Describe your first thoughts on how to solve this problem. \nInitially we need to convert the number in the form of array so that we can make the pa
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nInitially we need to convert the number in the form of array so that we can make the pairs of all the digits and check one by one which pairs will give the minimum sum.\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n<!-- Describe your approach to solving the problem. -->\nTo convert the num in the array we will make a new array and extract the last digit and store it in the new array and sort the array so as to find the answer greedily.\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution \n{\n    public int minimumSum(int num) \n    {\n        int[] arr = new int[4];\n        int i=0;\n        while(num>0)\n        {\n            int a = num%10;\n            num = num/10;\n            arr[i++] = a;\n        }\n        Arrays.sort(arr);\n                 \n        int v1 = arr[0]*10 + arr[2];\n        int v2 = arr[1]*10 + arr[3];\n        return v1+v2;\n    }\n}\n```
['Java']