- 2068 Bhadra · 2 marks
Singly vs doubly linked list
Short answer
Singly linked list has one next pointer per node, allowing only forward traversal; deletion requires finding the predecessor. Douly linked list has prev and next pointers, enabling bidirectional traversal and direct node deletion using the prev pointer, but uses more memory.
Differentiate singly linked list from doubly linked list.
| Basis | Singly linked list | Doubly linked list |
|---|---|---|
| Pointers in a node | One (next) | Two (prev and next) |
| Traversal | Forward only | Forward and backward |
| Memory | Less | More |
| Node deletion | Needs previous node, O(n) search | Direct using prev |
| Pointer changes | Fewer | More |
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Doubly vs singly linked list · Data Structure and Algorithm, chapter 4 · asked 2×
- Doubly linked list: bank customer records · Data Structure and Algorithm, chapter 4
- Insert and delete before a node, singly linked · Data Structure and Algorithm, chapter 4
- Insert and delete kth node in doubly linked list · Data Structure and Algorithm, chapter 4 · asked 2×
- Delete last node of doubly linked list · Data Structure and Algorithm, chapter 4
- Doubly linked list advantages and disadvantages · Data Structure and Algorithm, chapter 4