package leetcode;

/**
 * https://leetcode.com/problems/maximum-swap/
 */
public class Problem670 {
    public int maximumSwap(int num) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem670 prob = new Problem670();
        System.out.println(prob.maximumSwap(2736)); // 7236
        System.out.println(prob.maximumSwap(9973)); // 9973
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/maximum-swap/
 */
public class Problem670 {
    public int maximumSwap(int num) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem670 prob = new Problem670();
        System.out.println(prob.maximumSwap(2736)); // 7236
        System.out.println(prob.maximumSwap(9973)); // 9973
        System.out.println(prob.maximumSwap(32579)); // 92573
        System.out.println(prob.maximumSwap(12345)); // 52341
        System.out.println(prob.maximumSwap(12345)); // 52341
        System.out.println(prob.maximumSwap(54321)); // 54321
    }
}

Update problem 670