I didnt get a few things in thsi Sagheer problem listed below

1)while deciding the set bit from left and right for every string its written if(l[i]) then temp = i why this statement if for

  1. void bitmask(bool tight,int pos,int val)
    what does this tight represent
    3)why we calling this bitmask(1,1,m+2);