n set bits

February 11, 2009 at 1:16 pm Leave a comment

Give an algorithm to find the kth integer with n set bits (i.e. having n number of bits set to 1).

Advertisements

Entry filed under: Puzzles.

Ages of Tony’s sons Girls and Oranges

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Blog Stats

  • 4,036 hits

Recent Comments


%d bloggers like this: