Find the maximum element in the array
k = max ( arr ) ; NEW_LINE m = [ 0 ] * ( k + 1 ) ; NEW_LINE for n in arr : NEW_LINE INDENT m [ n ] += 1 ; NEW_LINE DEDENT for n in range ( len ( arr ) - 1 , 0 , - 1 ) : NEW_LINE INDENT if ( n == m [ n ] ) : NEW_LINE INDENT return n ; NEW_LINE DEDENT DEDENT return - 1 ; NEW_LINE