Recall & Review
beginner Click to reveal answer
What does forward traversal mean in a linked list?
Forward traversal means moving from the first node to the last node by following the next links one by one.
beginner Click to reveal answer
What is backward traversal in a doubly linked list?
Backward traversal means moving from the last node to the first node by following the previous links one by one.
beginner Click to reveal answer
Why can't we do backward traversal in a singly linked list?
Because singly linked lists only have links to the next node, not to the previous one, so we cannot move backward easily.
beginner Click to reveal answer
In a doubly linked list, which pointers are used for forward and backward traversal?
The 'next' pointer is used for forward traversal, and the 'prev' pointer is used for backward traversal.
beginner Click to reveal answer
What is the output after forward traversal of this doubly linked list: 1 <-> 2 <-> 3 <-> null?
The output is: 1 -> 2 -> 3 -> null
Which traversal is possible in a singly linked list?
✗ Incorrect
Singly linked lists have links only to the next node, so only forward traversal is possible.
In a doubly linked list, what does the 'prev' pointer do?
✗ Incorrect
The 'prev' pointer points to the previous node, enabling backward traversal.
What is the first step in forward traversal of a linked list?
✗ Incorrect
Forward traversal always starts from the head node and moves forward.
Which data structure allows easy traversal both forward and backward?
✗ Incorrect
Doubly linked lists have pointers to both next and previous nodes, allowing traversal in both directions.
What will be the output of backward traversal of this doubly linked list: 1 <-> 2 <-> 3 <-> null?
✗ Incorrect
Backward traversal starts from the last node and moves to the first, so output is 3 -> 2 -> 1 -> null.
Explain how forward and backward traversal work in a doubly linked list.
Think about the pointers that connect nodes in both directions.
You got /4 concepts.
Why is backward traversal not possible in a singly linked list? How does a doubly linked list solve this?
Focus on the difference in node connections.
You got /4 concepts.
