Convert each positive integer to its decimal representation, test whether its length is even, and count the matches.
complexity
O(n * d) time, where d is the maximum digit count, and O(1) auxiliary space.
solution files
- Go
find-numbers-with-even-number-of-digits/solution.go - Python
find-numbers-with-even-number-of-digits/solution.py - TypeScript
find-numbers-with-even-number-of-digits/solution.ts