Question: 3 Linked List The following exercises deal with coding a LinkedList. The Linkedlist is composed of generic Node objects The Linkedlist contains a NodecE>head referencing
3 Linked List The following exercises deal with coding a LinkedList. The Linkedlist is composed of generic Node objects The Linkedlist contains a NodecE>head referencing the first node in the list. The Linkedlist contains a NodecExtail referencing the last node in the list The LinkedList contains a method sizel) that returns the number of elements in the list The Node objects are doubly-linked, and contain public variables next and prev, which reference the next and previous nodes in the list respectively 12. (3 points) Write a method called deletelist(), which removes all the items in a list, making it empty //again, this is an instance method inside LinkedList / so you have access to head, tail (optionall, and the Node class public void deleteList) ( Page 7 of 14
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
