Easy c++ counting based solution
Intuition\n Describe your first thoughts on how to solve this problem. \nConstraints are low (max 10 bits) so just counted set bit even and odd bits\n# Approach
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\nConstraints are low (max 10 bits) so just counted set bit even and odd bits\n# Approach\n<!-- Describe your approach to solving the problem. -->\n1. Initialise the even , odd and bit count as 0.\n2. Used while loop to count all even setbits and oddsetbits\n3. return the ans.\n# Complexity\n- Time complexity: O(No of bits) here no of bits wll be always less than 11.\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    vector<int> evenOddBit(int n) {\n        int a=0,b=0;\n        int c=0;\n        while(n>0)\n        {\n            if(c%2==0)\n            {\n                if(n%2==1)\n                {\n                    a++;\n                }\n            }\n            else\n            {\n                if(n%2==1) b++;\n            }\n            n=n/2;\n            c++;\n            \n        }\n        return {a,b};\n    }\n};\n```
['Math', 'Bit Manipulation', 'Counting', 'C++']