''Function to return max_element index
def max_element ( arr ) : NEW_LINE INDENT idx = 0 ; NEW_LINE max = arr [ 0 ] ; NEW_LINE for i in range ( 1 , len ( arr ) ) : NEW_LINE INDENT if ( max < arr [ i ] ) : NEW_LINE INDENT max = arr [ i ] ; NEW_LINE idx = i ; NEW_LINE DEDENT DEDENT return idx ; NEW_LINE DEDENT