- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
/**
* Bit representation of index => bitMask = 2^(idx-1)
* When element is first in the list then bitMask=1
* for second bitMask=2, third will have bitMask=4 and so on
*/
static int bitMask = 1;
int main(int argc, char **argv){
...
bitMask = (int) pow(2, idx - 1);
...
}
3_14dar 11.09.2015 18:32 # 0
bormand 11.09.2015 22:04 # +3