leetle

Daily challenge for 2026-08-10

587. Symmetric Parity Check

Given an array of non-negative integers nums, determine if every element has the same parity (even or odd status) as its symmetric counterpart from the end of the array.

Specifically, the element at index i must have the same parity as the element at index nums.length - 1 - i.

Return true if all symmetric pairs have matching parity, and false otherwise.

Example:
Input: nums = [2, 5, 9, 4]
Output: true
Explanation: Index 0 (2, even) matches index 3 (4, even). Index 1 (5, odd) matches index 2 (9, odd).

Run this challenge interactively in Python or JavaScript when the app loads.