(int n, int i, int j)
| 40 | |
| 41 | //Clear Bits in Range (i,j) |
| 42 | public static int clearBitsinRange(int n, int i, int j) { |
| 43 | int a = ~0<<i; |
| 44 | int b = (1<<i)-1; |
| 45 | int bitMask = a | b; |
| 46 | return n & bitMask; |
| 47 | } |
| 48 | |
| 49 | //Check if number is power of 2 or not |
| 50 | public static boolean isPowerof2(int n) { |
nothing calls this directly
no outgoing calls
no test coverage detected