(int i)
| 59 | } |
| 60 | |
| 61 | public static int getPrevSlow(int i) { |
| 62 | if (!hasValidPrev(i)) { |
| 63 | return -1; |
| 64 | } |
| 65 | int num_ones = countOnes(i); |
| 66 | i--; |
| 67 | while (countOnes(i) != num_ones) { |
| 68 | i--; |
| 69 | } |
| 70 | return i; |
| 71 | } |
| 72 | |
| 73 | public static int getNext(int n) { |
| 74 | int c = n; |
no test coverage detected