Question: Hi, could you please solve the question using Java Linked List 3 Linked List The following exercises deal with coding a LinkedList. The LinkedList is

Hi, could you please solve the question using Java Linked List

Hi, could you please solve the question using Java Linked List 3Linked List The following exercises deal with coding a LinkedList. The LinkedListis composed of generic Node objects. The LinkedList contains a Node head

3 Linked List The following exercises deal with coding a LinkedList. The LinkedList is composed of generic Node objects. The LinkedList contains a Node head referencing the first node in the list. The LinkedList contains a Node tail referencing the last node in the list. The LinkedList contains a method size() 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. (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 (optional), and the Node class public void deleteList() { (10 points) Write an instance method called count. Count iterates over a LinkedList and returns the number of times item occurs in the list. // This is an instance method, so you can access the head, tail, and the Node class public int count(E item) {

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!