Question DSA-LL-0048
MediumWhy is a doubly linked list better than a singly linked list for deleting a node given only a pointer to it?
- A.
It uses less memory
- B.
It is always sorted
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Linked Lists question
Why is a doubly linked list better than a singly linked list for deleting a node given only a pointer to it?
It uses less memory
It is always sorted
Sign up free to see the answer and a step-by-step explanation.
The node's prev pointer gives its predecessor directly, so deletion is O(1)
It needs no head