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, visiting each node one by one in order.
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, visiting each node in reverse order using the previous links.
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 TypeScript, which property do you use to move forward in a doubly linked list node?
You use the
next property to move forward to the next node.beginner Click to reveal answer
In TypeScript, which property do you use to move backward in a doubly linked list node?
You use the
prev property to move backward to the previous node.Which traversal direction is NOT possible in a singly linked list without extra memory?
✗ Incorrect
Singly linked lists only have links to the next node, so backward traversal is not possible without extra memory.
In a doubly linked list, which pointer helps in backward traversal?
✗ 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 at the head (first) node.
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.
If you want to print all nodes from last to first, which traversal do you use?
✗ Incorrect
Backward traversal visits nodes from last to first.
Explain how forward and backward traversal work in a doubly linked list.
Think about which pointers connect nodes in each direction.
You got /4 concepts.
Why is backward traversal not straightforward in singly linked lists? How can it be achieved if needed?
Consider the links available in singly linked lists.
You got /4 concepts.
