(int n, int start)
| 1 | class Solution { |
| 2 | public int xorOperation(int n, int start) { |
| 3 | |
| 4 | int res=start; |
| 5 | for(int i=0;i<n-1;i++) |
| 6 | { |
| 7 | int x=(res | (start + 2*(i+1))); |
| 8 | int y=(~res | ~(start + 2*(i+1))); |
| 9 | res = (x&y); |
| 10 | } |
| 11 | return res; |
| 12 | } |
| 13 | } |
nothing calls this directly
no outgoing calls
no test coverage detected