Answered You can hire a professional tutor to get the answer.

QUESTION

Delete the Fifths Start with the List class provided. Add a method called deleteFifth() that rewires the linked list in the following way: deletes...

I have a question about delete the fifths, add a method called deleteFifth that rewires the linked list in following ways(See attachment), below is what I have right.

----------------------------------------------------------------------------------------------------------

'List.java "

package listdemo;

/**

 *

 * @author LWTECH

 */

public class List {

  private class Node

  {

    int value;  

    Node next;    

    /**

      Constructor.       

      @param val The element to store in the node.

      @param n The reference to the successor node.

    */

    Node(int val, Node n)

    {

      value = val;

      next = n;

    } 

    /**

      Constructor. 

      @param val The element to store in the node.

    */

    Node(int val)

    {

      // Call the other (sister) constructor.

      this(val, null);       

    }

  }

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question