i have a problem, that i don\'t know how to solve it.
i have a binary string and i want to generate all possible binary substrings.
Example :
Magic - assumes bitmask though:
subset( int x ) list = () for ( int i = x; i >= 0; i = ( ( i - 1 ) & x ) ) list.append( i ) return list
You can use the same logic, though it's a little bit more involved, with a binary string.