Popular Posts

Monday, September 12, 2011

Generate all the strings of n bits

Problem:
Generate all the strings of n bits.
Solution:
Subtract and Conquer.
Complexity: O(2^n)
Code: