My approach was to loop through the nums arr and check the equality of the parities of adjacent elements, so it checks if elements at i and i+1 are either both even or both odd
class Solution {
public:
bool isArraySpecial(vector& nums) {
My approach was to loop through the nums arr and check the equality of the parities of adjacent elements, so it checks if elements at i and i+1 are either both even or both odd
class Solution {
public:
bool isArraySpecial(vector& nums) {