Nth number with K set bits
We are given with k number of set bits (bit=1). We have to find the Nth
number which has k set bits.

for example

k=3

the numbers with k set bits are as follows:

000111 = 7
001011 = 11
001101 = 13
001110 = 14
010011 = 19
010101 = 21
010110 = 22
011001 = 25
011010 = 26
011100 = 28
....
and so on....

we have to find the Nth number in this series...

suggest some method

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to