Skip to content

Commit b543e1c

Browse files
authored
Create 3151. Special Array I
1 parent db32ccd commit b543e1c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

3151. Special Array I

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

0 commit comments

Comments
 (0)