Пример #1
0
def OP2BTree(lista, BTree):
    if not (lista is None or BTree is None):
        for item in lista:
            aux = BTree.get(item)
            if aux == None:
                BTree.insert(item)

        return str(BTree)
Пример #2
0
def OP3BTree(lista, BTree):
    if not (lista is None or BTree is None):
        for item in lista:
            aux = BTree.get(item)
            if aux != None:
                lista.remove(item)

        return str(lista)
Пример #3
0
def OP1BTree(lista, BTree):
    if not (lista is None or BTree is None):
        inter = []
        for item in lista:
            aux = BTree.get(item)
            if aux == item:
                inter.append(item)
        return inter