def frequencies(colorings):
    """
    Procedure for computing the frequency of each colour in a given coloring.
    :param colorings: The given coloring.
    :return: An array of colour frequencies.
    """
    maxvalue = -1
    frequency = [0] * (len(colorings))
    for i in colorings:
        maxvalue = max(maxvalue, i)
        frequency[i] += 1
    frequency = frequency[:maxvalue + 1]

    return frequency