Browse Source

add rotate to linked list test.

master
Charles Reid 2 years ago
parent
commit
4c1e7d9d79
1 changed files with 11 additions and 1 deletions
  1. +11
    -1
      lists/linked-lists/CLinkedList.java

+ 11
- 1
lists/linked-lists/CLinkedList.java View File

@@ -75,7 +75,6 @@ public class CLinkedList<E> {
}



// Round-Robin Scheduling
// No head stored - because you can move forward, but not backward
private Node<E> tail = null;
@@ -185,8 +184,19 @@ public class CLinkedList<E> {
c.addLast(i);
}
System.out.println(c);

System.out.println("------");

c.rotate();
c.rotate();
c.rotate();
System.out.println(c);

System.out.println("------");

c.removeFirst();
c.removeFirst();
System.out.println(c);

}
}

Loading…
Cancel
Save