Function to perform update operation in the Segment seg
def update ( left , right , index , Value , node , ar , seg ) : NEW_LINE INDENT if ( left == right ) : NEW_LINE INDENT ar [ index ] = Value NEW_LINE DEDENT DEDENT