Searching an ordered linked list is a sequential search process similar to what we just covered with insertion. A linked list is not a random access data structure. You cannot jump to the middle of a linked list. Only sequential moves are possible. The search function could return a value or a pointer to that cell.
-
Deleting a value involves the following steps:
-
Locating the value (if it exists) to be deleted.
-
Re-hooking pointers around the node to be deleted.
- Updating
first
or last
if necessary.