Check if rightmost set bit of current array element is same as position of rightmost set bit in K
if ( ( arr [ i ] & mask ) == pos ) : NEW_LINE INDENT print ( arr [ i ] , end = " ▁ " ) ; NEW_LINE DEDENT