Given an array of positive integers numbers, calculate how many of its elements have an even number of digits.
Note: You are not expected to provide the most optimal solution, but a solution with time complexity not worse than O(numbers.length * log<sub>10</sub>max) will fit within the execution time limit.
For numbers = [12, 134, 111, 1111, 10], the output should be solution(numbers) = 3.
There are 3 elements (numbers[0], numbers[3], and numbers[4]) with an even number of digits, so the answer is 3.
The number of elements in numbers with an even number of digits.
Amazon • Pending