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, …


  1. Thanks for sharing. This is my collection of question related with bit manipulation.

  2. Tks very much for your post.

    Avoid surprises — interviews need preparation. Some questions come up time and time again — usually about you, your experience and the job itself. We've gathered together the most common questions so you can get your preparation off to a flying start.

    You also find all interview questions at link at the end of this post.

    Source: Download Ebook: Ultimate Guide To Job Interview Questions Answers:

    Best rgs