Jan 29, 2008

Count the number of set bits in a byte/int32

Hint: there are atleast 7 solutions each with varying runtime complexities. Popular ones are O(no. of bits), O(no. of set bits), O(no. of unset bits)

No comments: