| number of data values | number of nodes |
| 3 | 3 |
| 2 | 2 |
| 1 | 1 |
| 0 | 0 |
A recursive definition of a linked list:
* null
* a node whose next refers to a linked list
Why Linked Lists?
* Linked list are BEAUTIFUL.
* Linked lists are more efficient than arrays/ArrayLists in some situations
* Linked lists provide a foundation for understanding other node-based data structures (trees, graphs)
No comments:
Post a Comment