Ejemplo n.º 1
0
        public Pilha inverte()
        {
            Pilha a = new Pilha();

            if (!isEmpty())
            {
                NohPilha temp = topo;
                while (temp != null)
                {
                    a.push(temp.Data);
                    temp = temp.Next;
                }
                a.print();
            }
            return(a);
        }