Adding frequency of elements of suffix to hash for subarray starting from first index There is no prefix for this sub array
for i in range ( k , n ) : NEW_LINE INDENT m [ a [ i ] ] += 1 NEW_LINE DEDENT