Easy, Detailed and Fast JAVA solution.
Intuition\n Describe your first thoughts on how to solve this problem. \n\nNow if there are two 2-digit numbers then it will have one at tens position and other
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\nNow if there are two 2-digit numbers then it will have one at tens position and other at unit position.\n\n    74 = 70 * 10 + 4   (7 is at tens digit and 4 is at unit digit.)\n\nNow, since we know that tens digit will have more impact on the number than unit digit number.\n\n    47 = 40 * 10 + 7   (4 is at tens digit and 7 is at unit digit.)\n\nHence if there are two 2-digit numbers in that array, their tens position digit should be minimum.\n\nif a number is ABCD where A,B,C and D are digits then after sorting, A and B should take tens position and C and D should take unit digit postion.\n\n    eg. 8239 --> 2389 (after Sorting)\n\n        [28,39] --> sum = 67 or [29,38] --> sum = 67\n\nwe will have AC+BD or AD+BC. they both will have equal sum always.\n\nthis will be our minimum sum.  \n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. Initialize an array for sorting purpose.\n2. One by one extract the digits from the number.\n3. Sort the array.\n4. Match the 0th index digit with 2nd index digit and 1st with 3rd.\n5. Add the two new number.\n6. Final sum will be minimum.\n\n# Complexity\n- Time complexity: $$O(1)$$\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: $$O(1)$$\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                    //1. Initialize an array for sorting purpose.\n        int[] arr = new int[4];\n        int i=0;\n                    //2. One by one extract the digits from the number.\n        while(num>0)\n        {\n            int a = num%10;\n            num = num/10;\n            arr[i++] = a;\n        }\n                    //3. Sort the array.\n        Arrays.sort(arr);\n                    //4. Match the 0th index digit with 2nd index digit and 1st with 3rd.\n        int v1 = arr[0]*10 + arr[2];\n        int v2 = arr[1]*10 + arr[3];\n                    //5. Final sum will be minimum.\n        return v1+v2;\n    }\n}\n```
['Math', 'Sorting', 'Java']