Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public IntLinkedList copyList() {
- IntLinkedList blist = new IntLinkedList();
- Node currentnode = head;
- while (currentnode != null) {
- blist.addFirst(currentnode.data);
- currentnode = currentnode.next;
- }
- return blist;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement