Mind map
Linked Lists
Map content
Linked Lists
Variable size
- Change in real time (on run time)
composed of nodes
- structs
- contains the data types you want
- one element is a pointer to the next node
- structs
Saved in the heap
- dynamic memory
- malloc
- each node individually
- Assert
- sizeof
- free
- Each node individually (loop)
- malloc
- dynamic memory
ALWAYS started by the head pointer
- The first thing you ALWAYS do is declare and initialize the head pointer,
Singly linked
- list pointing in one direction
- once you go to the next node, you can't get back, UNLESS you keep track of the previous node
- have a 'previous' pointer
- once you go to the next node, you can't get back, UNLESS you keep track of the previous node
- list pointing in one direction
End of the list is represented by NULL
- Always begin by initializing the next pointers to NULL
2 'types' of lists
- empty
- head == NULL
- full or occupied
- head == address to a node
- empty
3 conditions to check
- At the front
- At the back
- At the middle
List Traversal
- For loop
- Stop when reach the next=null
- For loop
Information
- Description
- Mind Map on Linked Lists, created by Madeline Harlow on 03/11/2014.
- Created by
- Madeline Harlow
- Views
- 54
- Rating