3151. Special Array I
All prompts are owned by LeetCode. To view the prompt, click the title link above.
First completed : February 01, 2025
Last updated : February 01, 2025
Related Topics : Array
Acceptance Rate : 82.1 %
class Solution:
def isArraySpecial(self, nums: List[int]) -> bool:
return all(x % 2 != y % 2 for x, y in zip(nums[:-1], nums[1:]))