Length of the longest Subarray with only Even Elements
Given an array arr[]. The task is to find the length of the longest subarray of arr[] such that it contains only even elements.Examples: Input : arr[] = [5, 2, 4, 7]Output : 2Explanation: Subarray [2, 4] is the longest subarray containing only even elements.Input : arr[] = [9, 8, 5, 4, 4, 4, 2, 4, 1