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 : N/A
Acceptance Rate : Unknown
class Solution:
def isArraySpecial(self, nums: List[int]) -> bool:
return all(x % 2 != y % 2 for x, y in zip(nums[:-1], nums[1:]))