Stores the frequencies
freq = [ 0 ] * ( n + 1 ) NEW_LINE maxi = - 1 NEW_LINE mini = n + 1 NEW_LINE for i in range ( len ( a ) ) : NEW_LINE INDENT maxi = max ( maxi , a [ i ] ) NEW_LINE mini = min ( mini , a [ i ] ) NEW_LINE DEDENT