← Linked List Quiz: all 8 questions
Linked List Quiz · Question 5 of 8
What is the main benefit of a dummy (sentinel) node?
What is the main benefit of a dummy (sentinel) node?
- A.It makes the list sorted
- B.It removes special cases when the head might change
- C.It doubles the speed
- D.It stores the length
Answer & explanation
Correct answer: It removes special cases when the head might change
Every real node gets a predecessor, so deleting or replacing the head needs no extra if-statements.
Can you get the rest right without peeking?
Take the timed Linked List Quiz quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →