Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public LinkStack copia_pilha(LinkStack P){
- LinkStack aux = new LinkStack();
- LinkStack copy = new LinkStack();
- while(!P.isEmpty())
- aux.push(p.pop());
- while(!aux.isEmpty()){
- int data = aux.pop();
- p.push(data);
- copy.push(data);
- }
- return copy;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement