Given an array, check that the pattern of even then odd is upheld

I’m stumped on this problem: Given an array, check that every number switches from even to odd. All numbers in the array are positive integers. If there is a number that breaks the pattern, return the index of that number. If there aren’t any numbers that break the pattern, return a -1 Example arrays +… Read More Given an array, check that the pattern of even then odd is upheld