Beautiful Codes for Beautiful Problems
Monday, 13 October 2014
Count no. of set bits in an integer using gcc built-in function
We can use the gcc buitin method
int __builtin_popcount (unsigned int x)
Returns the number of 1-bits in x.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment