from typing import List


def percentile(values: List[float], n: float) -> float:
    """
    Calculate the linear interpolated percentile from an array of values
    :param values: an array of values
    :param n: percentage / 100 : 0 < n < 1
    :return: percentile value
    """
    if len(values) == 1:
        return values[0]
    values = sorted(values)
    float_index = n*(len(values)-1)
    i = int(float_index)
    w = abs(float_index-i)
    return values[i] + w*(values[i+1]-values[i])