Skip to content

Commit e3296ee

Browse files
committed
Time: 0 ms (100.00%) | Memory: 27.7 MB (25.00%) - LeetSync
1 parent 5170e95 commit e3296ee

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Solution {
2+
public:
3+
bool isArraySpecial(vector<int>& nums) {
4+
for(int i = 1; i < nums.size(); ++i) {
5+
if(nums[i - 1] % 2 == nums[i] % 2) {
6+
return false;
7+
}
8+
}
9+
10+
return true;
11+
}
12+
};

0 commit comments

Comments
 (0)