Skip to content

Commit 5d4b96e

Browse files
committed
3151
1 parent 8be0c87 commit 5d4b96e

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)