get max from one side and update
if ( curMax [ 0 ] > max1 ) : NEW_LINE INDENT max2 = max1 NEW_LINE max1 = curMax [ 0 ] NEW_LINE DEDENT else : NEW_LINE INDENT max2 = max ( max2 , curMax [ 0 ] ) NEW_LINE DEDENT