(int[] nums1, int[] nums2)
| 1 | class Solution { |
| 2 | public int xorAllNums(int[] nums1, int[] nums2) { |
| 3 | // n + m |
| 4 | int n = nums1.length; |
| 5 | int res=0; |
| 6 | if(n%2!=0){ |
| 7 | for(int num : nums2){ |
| 8 | res^=num; |
| 9 | } |
| 10 | } |
| 11 | int m = nums2.length; |
| 12 | if(m%2!=0){ |
| 13 | for(int num : nums1){ |
| 14 | res^=num; |
| 15 | } |
| 16 | } |
| 17 | return res; |
| 18 | } |
| 19 | } |
nothing calls this directly
no outgoing calls
no test coverage detected