Course Solutions Uncategorized (Solved) : Add Method Linked List Classes Created Class Posted Make Sure Method Changes Pointers Nod Q34667167 . . . .

(Solved) : Add Method Linked List Classes Created Class Posted Make Sure Method Changes Pointers Nod Q34667167 . . . .

 

Add a method to the Linked List classes we created in class(posted below).
Make sure your method only changes the pointers to the other nodesand not the actual data being stored.
Make sure to account for all special cases.

Method Header:
public void swap(int index)
If the index = 0, then swap 0 and 1, if 10 is given, swap 10 and11.

Double linked

public class MyDoubleLinkedList<E> {

private Node start, end;

private int currentCount;

public MyDoubleLinkedList()

{

start = null;

end = null;

currentCount = 0;

}

public void printList()

{

Node current = start;

while(current != null)

{

System.out.println(current.value);

current = current.next;

}

}

public void printListRev()

{

Node current = end;

while(current != null)

{

System.out.println(current.value);

current = current.prev;

}

}

public void add(E val)//O(1)

{

Node newItem = new Node(val);

//if list is

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : Management Information System Course Mba Introduction Information Systems Information Syst Q34185053 . . . .(Solved) : Management Information System Course Mba Introduction Information Systems Information Syst Q34185053 . . . .

<p><strong>MANAGEMENT INFORMATION SYSTEM Course , MBA</strong></p><p>   <em>Introduction to Information Systems</em> Aninformation system is a set of interrelated components that worktogether to collect, process, store, and disseminate information tosupport decision making,