We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db32ccd commit b543e1cCopy full SHA for b543e1c
3151. Special Array I
@@ -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