equal
deleted
inserted
replaced
49 public static void verify(int src[]) { |
49 public static void verify(int src[]) { |
50 for (int i = 0; i < src.length; i++){ |
50 for (int i = 0; i < src.length; i++){ |
51 int value = (i-1 + src.length)%src.length; // correct value after shifting |
51 int value = (i-1 + src.length)%src.length; // correct value after shifting |
52 if (src[i] != value) { |
52 if (src[i] != value) { |
53 System.out.println("Error: src["+i+"] should be "+ value + " instead of " + src[i]); |
53 System.out.println("Error: src["+i+"] should be "+ value + " instead of " + src[i]); |
54 System.exit(-1); |
54 System.exit(97); |
55 } |
55 } |
56 } |
56 } |
57 } |
57 } |
58 |
58 |
59 public static void test() { |
59 public static void test() { |