Ejemplo n.º 1
0
 def test_Eliminar_HijoDer(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(45)
     bst.Insertar(32)
     bst.Insertar(91)
     bst.Eliminar(45)
Ejemplo n.º 2
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)
Ejemplo n.º 3
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()
Ejemplo n.º 4
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)
Ejemplo n.º 5
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)
Ejemplo n.º 6
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)
Ejemplo n.º 7
0
 def test_Eliminar_Vacio(self):
     bst = Tree()
     bst.Eliminar(21)
Ejemplo n.º 8
0
 def test_Eliminar_Der(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(53)
     bst.Eliminar(21)
Ejemplo n.º 9
0
 def test_Eliminar_Izq(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Insertar(19)
     bst.Eliminar(21)
Ejemplo n.º 10
0
 def test_Eliminar_Raiz(self):
     bst = Tree()
     bst.Insertar(21)
     bst.Eliminar(21)
Ejemplo n.º 11
0
 def test_PostOrden_Vacio(self):
     bst = Tree()
     bst.ImprimirPostOrden()
Ejemplo n.º 12
0
 def test_Insertar_Repetido(self):
     bst = Tree()
     bst.Insertar(60)
     bst.Insertar(60)
Ejemplo n.º 13
0
 def test_InOrden_Vacio(self):
     bst = Tree()
     bst.ImprimirInOrden()
Ejemplo n.º 14
0
 def test_Min_Vacio(self):
     bst = Tree()
     bst.BuscarMin(bst.raiz)
Ejemplo n.º 15
0
 def test_Max_Vacio(self):
     bst = Tree()
     bst.BuscarMax(bst.raiz)