Memory Storage for Linked Lists
Linked list nodes are typically located in the heap
- because nodes are dynamically created
Variables containing pointers to list nodes
- are likely to be local variables (in the stack)
Pointers to the start of lists are often
- passed as parameters to function
- returned as function results
|