circular list operations
Circular Linked Lists and Iterators
Round-robin scheduling, circular linked lists with only a tail reference (rotate, add, remove), and the Iterator and Iterable interfaces.
How to read this page
Every original slide is shown unchanged. Yellow marks on a slide point to a numbered note: hover or tap a mark to jump to its note, and hover a note to see its marks. Questions tagged Past exam appeared on a real paper; Prediction questions are likely angles, not confirmed. Pick an answer to each question: a wrong pick tells you why it is wrong, so you can try again.
All 14 slides
- 1 Circular linked Lists
- 2 Round-Robin Scheduling
- 3 Round-Robin Scheduling
- 4 Circular Linked-Lists
- 5 Circular Linked-Lists
- 6 Circular Linked-Lists
- 7 Circular Linked-Lists: rotate
- 8 Circular Linked-lists:
- 9 tail
- 10 one
- 11 Presentation for use with the textbook Data Structures and Algorithms in Java, 6 th edition, by M. T. Goodrich, R. Tamassia, and M. H. Goldwasser, Wiley, 2014
- 12 Iterators
- 13 The Iterable Interface
- 14 The for-each Loop
Round-Robin Scheduling
Notes
Round-robin scheduling: each process gets a time slice, then goes to the back.
Circular Linked-Lists
Exam angle
circular list size / remove
In a circular singly linked list with a tail reference, the head is:
Circular Linked-Lists: rotate
Notes
rotate(): tail = tail.next moves the first element to the back in O(1).
The Iterable Interface
Notes
Iterable has iterator(); for-each works on any Iterable.