Python || 2 Approach (Math, String) || 99.70%beats
\n# Code\n> # Full Math Approach\n\nclass Solution:\n    def minimumSum(self, num: int) -> int:\n        n = []\n        while num > 0:\n            n.append(nu
\n# Code\n> # Full Math Approach\n```\nclass Solution:\n    def minimumSum(self, num: int) -> int:\n        n = []\n        while num > 0:\n            n.append(num%10)\n            num = num // 10\n        \n        n.sort()\n\n        n1 = n[0] * 10 + n[-1]\n        n2 = n[1] * 10 + n[-2]\n        return n1+ n2\n\n\n\n```\n\n> # String Approach\n```\nclass Solution:\n    def minimumSum(self, num: int) -> int:\n        num = \'\'.join(sorted(str(num)))\n        return int(num[0]+num[3]) + int(num[1]+num[2])\n\n\n#\n```
['Math', 'String', 'Greedy', 'Sorting', 'Python', 'Python3']