Presentation is loading. Please wait.

Presentation is loading. Please wait.

Variations of Linked Lists CS 308 – Data Structures.

Similar presentations


Presentation on theme: "Variations of Linked Lists CS 308 – Data Structures."— Presentation transcript:

1 Variations of Linked Lists CS 308 – Data Structures

2 Problems with singly connected lists Given a node, we can access only nodes that follow it but not nodes that precede it. We cannot delete a node, given only one a pointer to that node (location) To access the last element of the list, we must traverse the whole list We cannot traverse the list in reverse

3 Circular Linked Lists Extending a linear linked list to a circular linked list –Make the last node point back to the first node

4 Extending a linear linked list to a circular linked list (cont.) –To have access to both the first and last nodes of the list, make listData point to the last node


Download ppt "Variations of Linked Lists CS 308 – Data Structures."

Similar presentations


Ads by Google