Example #1
0
        public void AƱadir(int valor) 
        {
            if (this.raiz != null)
            {

                Nodo aux = this.raiz;
                while (aux.siguiente != null)
                {
                    aux = aux.siguiente;
                }
                aux.siguiente = new Nodo(valor);
            }
            else
            {
                this.raiz = new Nodo(valor);
            }
            numElementos++;
        }
Example #2
0
 public Nodo(int valor){
     this.valor = valor;
     siguiente = null;
 }
Example #3
0
 public void Borrar()
 {
     this.raiz = raiz.siguiente;
     numElementos--;
 }