← Accenture questions
CodingEasy to Medium

Count elements with matching index and value parity

Filed under Accenture

Given an array of integers, count the number of elements that satisfy the condition: (index % 2 == element % 2), meaning an odd index has an odd value, or an even index has an even value.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Accenture questions

Collected from public candidate posts and coding forums. Updated Nov 2026.