Subtopic 3.1
Singly Linked List
12lessons1 h 7 min0done on this device
In a singly linked list each node holds a value and the address of the next node. You enter the list through head, and the last node's next field is NULL.
This subtopic covers twelve operations in order, from building the list to reversing it. The order matters: the insert and delete lessons rely on traversal, and the reversal lessons use all of them together.
- 3.1.1What is a singly linked list?5 min
- 3.1.2Creating a singly linked list6 min
- 3.1.3Traversal5 min
- 3.1.4Inserting at the end5 min
- 3.1.5Inserting at a position7 min
- 3.1.6Inserting at the head4 min
- 3.1.7Deleting from the end6 min
- 3.1.8Deleting from the head4 min
- 3.1.9Deleting from the middle6 min
- 3.1.10Searching for a value4 min
- 3.1.11Reversing a linked list (iterative)7 min
- 3.1.12Reversing a linked list (recursive)8 min