C++ Solution
Complexity\n- Time complexity: O(logn)\n Add your time complexity here, e.g. O(n) \n\n- Space complexity: O(1)\n Add your space complexity here, e.g. O(n) \n\n#
# Complexity\n- Time complexity: $$O(logn)$$\n<!-- Add your time complexity here, e.g. $$O(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 pos1=0, pos2=0;\n        bool chk=1;\n        while (n>0){\n            if (chk){\n                pos1+= (n&1);\n            }\n            else{\n                pos2+= (n&1);\n            }\n            chk= !chk;\n            n= n>>1;\n        }\n        return {pos1,pos2};\n    }\n};\n```
['Bit Manipulation', 'C++']