Example #1
0
 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);
     }
 }
Example #2
0
        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);
            }
        }