Max Swap
Max Swap
*;
public class Ash{
int n = N.length;
// Backtrack
char c = N[i];
N[i] = N[j];
N[j] = c;
M--;
}
}
}
}
}
// Driver code
public static void main(String[] args)
{
String N = "1123";
int M = 1;
max = N;
findMaximumNum(N.toCharArray(), M);
System.out.print(max + "\n");
}
}