2024-08-13发表2024-09-05更新LeetCode每日一题几秒读完 (大约59个字)0次访问3151. 特殊数组 I特殊数组 I 难度: easy 原始链接: https://leetcode.cn/problems/special-array-i 标签: 循环 解法一: 循环go12345678910func isArraySpecial(nums []int) bool { flag := nums[0] & 1 for _, num := range nums[1:] { if flag == (num & 1) { return false } flag = num & 1 } return true} 3151. 特殊数组 Ihttps://wuhunyu.top/leetcode/2024/08/special-array-i/index.html作者wuhunyu发布于2024-08-13更新于2024-09-05许可协议#循环