#12 - Count element in the array
List of numbers will be given as array. We need to count how many odd numbers and even numbers are there.
Example 1
Input:
arr = [12, 5, 8, 23, 17, 9]
Output:
Odd Numbers Count = 4
Even Numbers Count = 2
Example 2
Input:
arr = [12, 50, 8]
Output:
Odd Numbers Count = 0
Even Numbers Count = 3
Last updated