Minimum value among AND of elements of every subset of an array | Python program for the above approach ; Find AND of whole array ; Print the answer ; Driver code
def minAND ( arr , n ) : NEW_LINE INDENT s = arr [ 0 ] NEW_LINE for i in range ( 1 , n ) : NEW_LINE INDENT s = s & arr [ i ] NEW_LINE DEDENT print ( s ) NEW_LINE DEDENT arr = [ 1 , 2 , 3 ] NEW_LINE n = len ( arr ) NEW_LINE minAND ( arr , n ) NEW_LINE