[LeetCode] 3151. Special Array I (Python)
·
알고리즘/LeetCode
난이도: Easy문제 설명An array is considered special if every pair of its adjacent elements contains two numbers with different parity. You are given an array of integers nums. Return true if nums is a special array, otherwise, return false. 문제 예제Example 1:Input: nums = [1]Output: trueExplanation:There is only one element. So the answer is true.Example 2:Input: nums = [2,1,4]Output: trueExplanation:Ther..