#3151

Special Array I

newbie · 160 · lc easy +14 · 81.6% accepted · 581 likes · top 93%

Description

An integer array is special when each pair of adjacent elements has different parity (one even, one odd). Given nums, return true if it is special, false otherwise.

Code

1
2
3