Advertisement
Guest User

Untitled

a guest
Oct 6th, 2023
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. public IntLinkedList copyList() {
  2. IntLinkedList blist = new IntLinkedList();
  3. Node currentnode = head;
  4. while (currentnode != null) {
  5. blist.addFirst(currentnode.data);
  6. currentnode = currentnode.next;
  7. }
  8. return blist;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement