Skip to content

Commit f484e81

Browse files
committed
Runtime: 3 ms (Top 38.21%) | Memory: 6 MB (Top 42.79%)
1 parent 2d6102a commit f484e81

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
// Runtime: 3 ms (Top 38.21%) | Memory: 6 MB (Top 42.79%)
12
class Solution {
23
public:
3-
int xorOperation(int n, int start) {
4+
int xorOperation(int n, int start) {
45

5-
int res = start;
6+
int res = start;
67

7-
for(int i=1 ; i<n ; i++){
8-
res = res ^ (start + 2 * i);
9-
}
8+
for(int i=1 ; i<n ; i++){
9+
res = res ^ (start + 2 * i);
10+
}
1011

11-
return res;
12-
}
13-
};
12+
return res;
13+
}
14+
};

0 commit comments

Comments
 (0)