Clean || Easy-Understand || Short || Java
\nclass Solution {\n    public int minMaxDifference(int num) {\n        String val = String.valueOf(num);\n        int max = Integer.MIN_VALUE, min = Integer.MA
```\nclass Solution {\n    public int minMaxDifference(int num) {\n        String val = String.valueOf(num);\n        int max = Integer.MIN_VALUE, min = Integer.MAX_VALUE;\n        for(char c: val.toCharArray()){\n            for(int j=0; j<=9; j++){\n                String n = val.replaceAll(c+"",j+"");\n                max = Math.max(max, Integer.parseInt(n));\n                min = Math.min(min, Integer.parseInt(n));\n            }\n        }\n        return max - min;\n    }\n}\n```
['Java']