- Nodes & a pointer
- Dynamic data structure
Data and a pointer to the next node
Where an extra pointer is added so that node can point ot the previous and next item
Where the last node points to the first. To circle through the list.
Where an extra pointer is added to the previous item
- ISR routines
- Playlists (music players)
- Image viewers to switch between previous and next image
- Hash table collisions resolution as an overflow
- Linear search through them
- Move to the previous item (doubly linked list)
- Delete nodes
- Add nodes
- A data structure consisting of nodes/vertices & pointers/edges.
- Each vertex can have more than 2 edges
Directed - Points in one direction
Undirected - Doesn't have a specified direction
Where each edge is given a value showin the relationship between vertices
Objects or Dictionaries known as adjacent lists
- Convenient to work with
- Adding edges are very simple
Disadvantages:
- Graphs with many nodes and few edges leaveempty cells
- Larger graphs waste more memory
- Using static structures e.g. arrays makes it harder to add/delete nodes
Mapping road networks for navigation systems
Storing social network data
resource allocation
Breadth-first search - uses queues (FIFO) structure. One node is selected, visited and marked then adjacent nodes are visited & stored in a queue.
Depth-first search - uses stacks (LIFO) structure. Visited nodes are pushed onto the stack.
- When there are no nodes left to visit, the nodes are popped off the stack