(int n)
| 3 | public class Solution { |
| 4 | // you need treat n as an unsigned value |
| 5 | public int reverseBits(int n) { |
| 6 | int result = 0; |
| 7 | for (int i = 0; i < 32; i++) { |
| 8 | result <<= 1; |
| 9 | result |= (n & 1); |
| 10 | n >>= 1; |
| 11 | } |
| 12 | return result; |
| 13 | } |
| 14 | } |
nothing calls this directly
no outgoing calls
no test coverage detected