Beispiel #1
0
 def test_Eliminar_HijoDer(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(45)
     bst.Insertar(32)
     bst.Insertar(91)
     bst.Eliminar(45)
Beispiel #2
0
 def test_Eliminar_Nulo(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(13)
     bst.Insertar(10)
     bst.Insertar(33)
     bst.Insertar(18)
     bst.Eliminar(45)
Beispiel #3
0
 def test_Eliminar_HijoIzq(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(13)
     bst.Insertar(10)
     bst.Insertar(33)
     bst.Insertar(18)
     bst.Insertar(25)
     bst.Insertar(40)
     bst.Eliminar(13)
Beispiel #4
0
 def test_PostOrden(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(13)
     bst.Insertar(10)
     bst.Insertar(33)
     bst.Insertar(18)
     bst.Insertar(25)
     bst.Insertar(40)
     bst.ImprimirPostOrden()
Beispiel #5
0
 def test_Insertar(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(13)
     bst.Insertar(10)
     bst.Insertar(33)
     bst.Insertar(18)
     bst.Insertar(25)
     bst.Insertar(40)
     print(bst.raiz)
Beispiel #6
0
 def test_Min(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(13)
     bst.Insertar(10)
     bst.Insertar(33)
     bst.Insertar(18)
     bst.Insertar(25)
     bst.Insertar(40)
     bst.BuscarMin(bst.raiz)
Beispiel #7
0
 def test_Eliminar_Der(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(53)
     bst.Eliminar(21)
Beispiel #8
0
 def test_Eliminar_Izq(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(19)
     bst.Eliminar(21)
Beispiel #9
0
 def test_Eliminar_Raiz(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Eliminar(21)
Beispiel #10
0
 def test_Insertar_Repetido(self):
     bst = Tree()
     bst.Insertar(60)
     bst.Insertar(60)