def removeDuplicates(duplist):
    """
    双指针法去除有序列表中的重复项

    Parameters
    ----------
    duplist : list
        待去重的有序列表

    Returns
    -------
    list
        [description]
    """
    n = len(duplist)
    if n <= 1:
        return duplist
    fast = slow = 1
    while fast < n:
        if duplist[fast] != duplist[fast - 1]:
            duplist[slow] = duplist[fast]
            slow += 1
        fast += 1
    return duplist[:slow]