My First Post on LeetCode
IntuitionApproachThis method used double for loop, please comment. thanks!Complexity
Time complexity:

Space complexity:
Code
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\nThis method used double for loop, please comment. thanks!\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```javascript []\n/**\n * @param {number} num\n * @return {number}\n */\nvar minMaxDifference = function (num) {\n    let numStr = num.toString();\n    let max = num;\n    let min = num;\n    for (let i = 0; i < 10; i++) {\n        for (let j = 0; j < 10; j++) {\n            let newNum = parseInt(numStr.replaceAll(i, j))\n            if (newNum > max) {\n                max = newNum\n            } else if (newNum < min) {\n                min = newNum\n            } else {\n\n            }\n        }\n    }\n    return max - min\n};\n```
['JavaScript']