Dsa
Arrays
Warm-up
Even Odd Count
You are given an array of integers. Your task is to count how many of these integers are even and how many are odd.
Input format:
- A single line containing space-separated integers.
Output format:
- Two integers: the count of even numbers followed by the count of odd numbers, separated by a space.
Example:
Input:
1 2 3 4 5
Output:
2 3
Key concepts
arrayscountingparity
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now