✅Fast [87%][95%] C++, Python, JS, Java Unversal Approach✅
Approach\nBest Approach.\n\n# Complexity\n- Time complexity: O(log(n)) \n\n- Space complexity: O(1) \n Add your space complexity here, e.g. O(n) \n\n# Code\n\nc
# Approach\nBest Approach.\n\n# Complexity\n- Time complexity: $$O(log(n))$$ \n\n- Space complexity: $$O(1)$$ \n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nconst evenOddBit = (n) => {\n  let a = 0, b = 0, counter = 0;\n  while (n > 0) {\n    if (n % 2 == 1) {\n      counter % 2 === 0 ? a++ : b++;\n    }\n    counter++;\n    n = Math.floor(n / 2);\n  }\n  return [a, b];\n};\n\n```
['Bit Manipulation', 'JavaScript']