Generate previous combination with k bits high Set & - Set = ( 1 << last bit high in Set )
c = Set & - Set NEW_LINE r = Set + c NEW_LINE Set = ( ( ( r ^ Set ) >> 2 ) // c ) | r NEW_LINE return False NEW_LINE