well this question is different from the one where recursion makes more
sense(telephone dial pad and gereate english char combinations for a given
number)
int range = 2^n;
for int (i=0; i wrote:
> Hi,
> Can someone gimme the code to generate all possible bit strings of
> length n recursively ?
>
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 wrote:
> Hi,
> Can someone gimme the code to generate all possible bit strings o
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, sen