Count number of bits and do it in O(1)
Click for Solution
[Insert Code]