2595. Number of Even and Odd Bits, Time complexity: O(N), Space complexity: O(N)
IntuitionApproachComplexity
Time complexity: O(N)

Space complexity: O(N)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity: O(N)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(N)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```python3 []
class Solution:
    def evenOddBit(self, num):
        binary_num = format(num, 'b')
        
        count_even_bits = len([i for i in range(0, len(binary_num)) if i % 2 == 0 and list(reversed(binary_num))[i] == '1'])
        count_odd_bits = len([i for i in range(0, len(binary_num)) if i % 2 != 0 and list(reversed(binary_num))[i] == '1'])

        return [count_even_bits, count_odd_bits]
```
['Python3']