Skip to content

Commit f009056

Browse files
Merge pull request #205 from theforestvn88/jan
3151
2 parents b318f74 + 5d4b96e commit f009056

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

3101-3200/3151_special_array_i.rb

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# @param {Integer[]} nums
2+
# @return {Boolean}
3+
def is_array_special(nums)
4+
nums.each_cons(2).all? { |a, b| ((a & 1) ^ (b & 1)) == 1 }
5+
end

0 commit comments

Comments
 (0)