Start with number 1. It will have a binary representation of 00...1 (Total
of n-bits)
Keeping adding 1 to it until you reach a number with all 1's in its binary
representation.

On Thu, Aug 12, 2010 at 2:00 PM, Raj N <rajn...@gmail.com> wrote:

> Hi,
> Can someone gimme the code to generate all possible bit strings of
> length n recursively ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algoge...@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com<algogeeks%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algoge...@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to