public bool EliminaEnNodoRaiz(int Clave, long Direccion) { if (Llaves.Contains(Clave) && DireccionLlaves.Contains(Direccion)) { DireccionLlaves.Remove(Direccion); Llaves.Remove(Clave); DireccionLlaves.Add((long)-1); Llaves.Add(-1); return(true); } else { return(false); } }
public bool EliminaDatoEnHoja(int Clave) { if (Llaves.Contains(Clave)) { int Indice = Llaves.IndexOf(Clave); long SigNodo = DireccionLlaves[Arbol.GradoArbol - 1]; DireccionLlaves[Arbol.GradoArbol - 1] = (long)-1; Llaves.RemoveAt(Indice); DireccionLlaves.RemoveAt(Indice); Llaves.Add(-1); DireccionLlaves.Add(SigNodo); return(true); } else { return(false); } }