문제풀이 2021 02 08
2021.02.08 연습
- 사용언어 : java
class Solution {
public int xorOperation(int n, int start) {
int result = 0;
for (int i =0; i< n; i++) {
result ^= start+2*i;
}
return result;
}
}
Runtime: 0 ms, faster than 100.00% of Java online submissions for XOR Operation in an Array. Memory Usage: 35.2 MB, less than 99.10% of Java online submissions for XOR Operation in an Array.