Install our extension to search inside any video instantly.

COMP(1511|1911) Week 8 Lecture 2

Added:
249 views4likes1:57:29UNSW_comp1511Original Release: 2026-07-21

When deleting multiple nodes with the same value from a linked list, you must maintain a 'previous' pointer to track the node before the current one, and after deleting a node, update the current pointer to point to the next node (using current = previous->next) to continue traversing the list. This approach handles all cases including deleting the first node (where previous is null), deleting nodes in the middle, and deleting the last node, while ensuring the list remains properly connected throughout the process.