fork download
  1.  
  2. /*
  3.  * Jan 28, 2015 6:39:30 PM
  4.  * mohamed265
  5.  */
  6.  
  7. public class Main {
  8. public static void next_permutation(StringBuffer arr, int l) {
  9. if (l == arr.length()) {
  10. System.out.println(arr.toString());
  11. return;
  12. }
  13. char num = arr.charAt(l);
  14. for (int i = l; i < arr.length(); i++) {
  15. char temp = arr.charAt(i);
  16. arr.setCharAt(l, temp);
  17. arr.setCharAt(i, num);
  18. next_permutation(arr, l + 1);
  19. arr.setCharAt(i, temp);
  20. }
  21. arr.setCharAt(l, num);
  22. }
  23.  
  24.  
  25.  
  26. }
  27.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
spoj: The program compiled successfully, but main class was not found.
      Main class should contain method: public static void main (String[] args).
stdout
Standard output is empty