Professional Documents
Culture Documents
MyDoublyLinkedCircularList Java
MyDoublyLinkedCircularList Java
class List{
}
static Node start;
if (start == null)
{
Node node = new Node();
node.getData = value;
node.getNext = node.getPrev = node;
start = node;
return;
}
This study source was downloaded by 100000851302356 from CourseHero.com on 08-30-2022 04:33:08 GMT -05:00
https://www.coursehero.com/file/106719560/MyDoublyLinkedCircularListjava/
node.getNext = next;
next.getPrev = node;
}
System.out.println();
while (node.getNext != start)
{
System.out.printf("%d ", node.getData);
node = node.getNext;
}
System.out.printf("%d ", node.getData);
System.out.println();
Node last = start.getPrev;
node = last;
while (node.getPrev != last)
{
System.out.printf("%d ", node.getData);
node = node.getPrev;
}
System.out.printf("%d ", node.getData);
}
This study source was downloaded by 100000851302356 from CourseHero.com on 08-30-2022 04:33:08 GMT -05:00
https://www.coursehero.com/file/106719560/MyDoublyLinkedCircularListjava/
Powered by TCPDF (www.tcpdf.org)