Unformatted text preview: n2.data = "T" n2.next = n1; n1 = n2; n2 = null; n n2 = new Node(); n2.data = "W"; n2.next = n1.next.next.next.next; n2.next.next.next.next = n2; n // delete head n1 = n1.next; n // delete last n2.next = null; n // delete middle n1.next = n1.next.next } }...
View Full Document
This note was uploaded on 11/03/2009 for the course CS 01-111 taught by Professor Pradiphari during the Fall '09 term at Rutgers.
- Fall '09
- Computer Science