Given an array of integers, count the number of pairs (i, j) with i < j such that the sum of the elements at these indices is even, and the number of pairs where the sum is odd.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.