Bit Manipulation Interview Questions

No. 20 - Number of 1 in a Binary
Please implement a function to get the number of 1s in an integer. For example, the integer 9 is 1001 in binary, so it returns 2 since there are two bits of 1s.

No. 50 - Numbers Appearing Once
In an array, all numbers appear three times except one which only appears only once. Please find the unique number.

No. 51 - Next Number with Same Set of Digits
Given a number n, please out put all numbers with n bits of 1 in increasing order. For example, if the input is 3, the output are numbers 7, 11, 13, …

4 comments:

  1. Thanks for sharing. This is my collection of question related with bit manipulation. http://www.capacode.com/logic/bit-manipulation-questions/

    ReplyDelete
  2. Extraordinary Blog...The information you shared is amazingly, It is all around wrote and simple to undertand and social media marketing agency in chennai you have good thoughts to share something like this a debt of gratitude is in order for share this information.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete