Company: Visa_27oct
Difficulty: medium
Count Elements with Odd Zero Occurrences Problem Description You are given an array of non-negative integers a . Your task is to calculate how many elements of a have an odd number of occurrences of the digit 0 . For example, for [4, 50, 100, 65, 2000, 700, 1, 10] , the answer should be 3 . These numbers are 50 , 2000 and 10 . Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(a.length^2) will fit within the execution time limit. Examples Example 1: Input: a = [20, 11, 10, 10070, 7] Output: 3 Explanation: a[1] = 11 and a[4] = 7 : the digit 0 does not occur, so these elements do not count (since zero is an even number). a[0] = 20 and a[2] = 10 : the digit 0 occurs one time (which is an odd number), so these elements do count. a[3] = 10070 : the digit 0 occurs three times (which is an odd number), so this element counts. Constraints 1 ≤ a.length ≤ 10 3 0 ≤ a[i] ≤ 10 9 Execution time limit: 0.5 seconds (cpp) Me