1295. Find-Numbers-With-Even-Number-Of-Digits

Question Link

Difficulty: Easy

An easy question to end the month??? Just iterate through and check if the number of digits is even.

class Solution(object):
    def findNumbers(self, nums):
        """
        :type nums: List[int]
        :rtype: int
        """
        res = 0
        for num in nums:
            if len(str(num)) % 2 == 0:
                res += 1
        return res

Time Complexity: O(n)

Space Complexity: O(1)

Time Taken: 29s