i'm trying to solve a dp problem involves bitmasks and when i see others code, all of them have the these lines
for(mask = 0; mask < (1 << k); mask++){
..
for(submask = (mask - 1) & mask; submask > 0; submask = (submask - 1) & mask){
..
}
what these lines means ?