Exit Slides

Singly Linked List

overview

Summary

Remember: a singly linked list stores nodes with value and next pointer, starting at head. Prepend is O(1); append and search are O(n). Traverse by following next until null. To delete, track previous, update prev.next, and handle deleting the head. Edge cases: empty list, single node, and tail with next = null. Advantages: dynamic size and cheap front inserts. Limits: no random access, one-way links. Useful patterns: dummy head, insert-after-node, and iterative reverse with prev, curr, next.
← Prev Topic Slide 1 / 3 Next Topic: Doubly Linked List →