From charlesreid1

No edit summary
No edit summary
Line 1: Line 1:
==Types of linked lists==
The basic types of linked lists:
The basic types of linked lists:
* Singly linked list - forward links only
* Singly linked list - forward links only
* Doubly linked list - forward and backward links at each node
* Doubly linked list - forward and backward links at each node
* Circular linked list - end node points to front node, more efficient use of memory
* Circular linked list - end node points to front node, more efficient use of memory
===Singly linked list===
See [[Linked Lists/Python/Singly]]


Basic linked list implementation with Python: https://charlesreid1.com:3000/cs/python/src/master/lists/linked-lists/LinkedList.py
Basic linked list implementation with Python: https://charlesreid1.com:3000/cs/python/src/master/lists/linked-lists/LinkedList.py
Line 11: Line 17:
* Class organization, protection, etc.? (Node class - private? shared? how?)
* Class organization, protection, etc.? (Node class - private? shared? how?)


===Doubly linked list===
See [[Linked Lists/Python/Doubly]]
===Circular linked list===
See [[Linked Lists/Python/Circular]]





Revision as of 20:00, 4 June 2017

Types of linked lists

The basic types of linked lists:

  • Singly linked list - forward links only
  • Doubly linked list - forward and backward links at each node
  • Circular linked list - end node points to front node, more efficient use of memory

Singly linked list

See Linked Lists/Python/Singly

Basic linked list implementation with Python: https://charlesreid1.com:3000/cs/python/src/master/lists/linked-lists/LinkedList.py

Questions that arose from this:

  • Constructor overloading
  • Effectively handling exceptions? (best practices)
  • Class organization, protection, etc.? (Node class - private? shared? how?)

Doubly linked list

See Linked Lists/Python/Doubly

Circular linked list

See Linked Lists/Python/Circular


Flags