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